added associate membership status
This commit is contained in:
parent
c90813ed23
commit
1c50509082
16
src/fiber_package/entity/associate.py
Normal file
16
src/fiber_package/entity/associate.py
Normal file
@ -0,0 +1,16 @@
|
||||
from pydantic import Field
|
||||
|
||||
from .person import PersonModel
|
||||
from .submodels import Address, LoginInfo
|
||||
from .enums import Study
|
||||
|
||||
# An associate is someone who frequents activities & receives weekly mailing
|
||||
# However this person is not a full member, so no GMM rights
|
||||
# Combines concepts of "Nano-science" from DLF and "Activity-goer" from Kaiser
|
||||
|
||||
class AssociateModel(PersonModel):
|
||||
# optional fields are now required for associates & members
|
||||
login: LoginInfo
|
||||
address: Address
|
||||
|
||||
|
||||
@ -8,3 +8,11 @@ class Gender(StrEnum):
|
||||
male = "m"
|
||||
female = "f"
|
||||
nonbinary = "n"
|
||||
|
||||
class Study(StrEnum):
|
||||
bsc_math = "Bachelor Mathematics"
|
||||
bsc_phys = "Bachelor Physics"
|
||||
bsc_dsai = "Bachelor Data Science & AI"
|
||||
msc_math = "Master Mathematics"
|
||||
msc_phys = "Master Physics"
|
||||
min_dsai = "Minor Data Science & AI"
|
||||
@ -1,19 +1,16 @@
|
||||
from pydantic import Field
|
||||
|
||||
from .person import PersonModel
|
||||
from .associate import AssociateModel
|
||||
from .submodels import Address, LoginInfo
|
||||
from .enums import Study
|
||||
|
||||
class MemberModel(PersonModel):
|
||||
login: LoginInfo
|
||||
address: Address
|
||||
class MemberModel(AssociateModel):
|
||||
study: list[Study] = Field(default_factory=list)
|
||||
contribution_paid: bool = False
|
||||
active_member: bool = False
|
||||
studying: bool = False
|
||||
active_member_override: bool = False
|
||||
|
||||
# preferences
|
||||
receive_company_mail: bool = True
|
||||
receive_spam_mail: bool = True
|
||||
receive_physical_mail: bool = True
|
||||
in_physical_almanac: bool = False
|
||||
# IT stuff
|
||||
shell: str = "/bin/bash" # TODO: support other shells?
|
||||
mail_token: str | None = None
|
||||
|
||||
|
||||
@ -2,8 +2,7 @@
|
||||
from .person import PersonModel
|
||||
|
||||
class AlumnModel(PersonModel):
|
||||
graduated: bool = False
|
||||
receive_spam_mail: bool = True
|
||||
pass
|
||||
|
||||
class ExternalModel(PersonModel):
|
||||
pass
|
||||
|
||||
@ -6,7 +6,7 @@ BARE_TAGS = ["public"]
|
||||
|
||||
class Membership(StrEnum):
|
||||
member = "member"
|
||||
activity_goer = "activity_goer"
|
||||
associate = "associate"
|
||||
alumn = "alumn"
|
||||
# extern is linked to association A if they ever visisted an activity of association A
|
||||
extern = "extern"
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
from fiber_package.base import FiberBaseModel
|
||||
from fiber_package.refs import AssociationRefList, EntityRefList
|
||||
|
||||
class RootGroupModel(FiberBaseModel):
|
||||
sys_admins: EntityRefList
|
||||
Loading…
x
Reference in New Issue
Block a user