forked from oyd/Adunatio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
2.4 KiB
97 lines
2.4 KiB
4 years ago
|
from mongoengine import *
|
||
|
|
||
|
from internal_lib.EncryptedField import EncryptedStringField
|
||
|
from models.EmbededDocuments import Descriptions
|
||
|
from models.Group import Group
|
||
|
from models.Union import Union
|
||
|
|
||
|
|
||
|
class User(Document):
|
||
|
union = ReferenceField(Union)
|
||
|
member_no = LongField()
|
||
|
username = StringField()
|
||
|
photo = ImageField(thumbnail_size=(85,120))
|
||
|
password = StringField()
|
||
|
name = StringField()
|
||
|
middle_name = StringField()
|
||
|
last_name = StringField()
|
||
|
gov_id = EncryptedStringField()
|
||
|
mother_name = EncryptedStringField()
|
||
|
father_name = EncryptedStringField()
|
||
|
email = EncryptedStringField()
|
||
|
place_of_birth = EncryptedStringField()
|
||
|
date_of_birth = EncryptedStringField()
|
||
|
telephone = EncryptedStringField()
|
||
|
job = StringField()
|
||
|
address = EncryptedStringField()
|
||
|
accept_date = DateTimeField()
|
||
|
dismissal_date = DateTimeField()
|
||
|
descriptions = ListField(EmbeddedDocumentField(Descriptions))
|
||
|
gender = StringField(choices=(
|
||
|
'Man',
|
||
|
'Women',
|
||
|
'Agender',
|
||
|
'Androgyne',
|
||
|
'Androgynous',
|
||
|
'Bigender',
|
||
|
'Cis',
|
||
|
'Cisgender',
|
||
|
'Cis Female',
|
||
|
'Cis Male',
|
||
|
'Cis Man',
|
||
|
'Cis Woman',
|
||
|
'Cisgender Female',
|
||
|
'Cisgender Male',
|
||
|
'Cisgender Man',
|
||
|
'Cisgender Woman',
|
||
|
'Female to Male',
|
||
|
'FTM',
|
||
|
'Gender Fluid',
|
||
|
'Gender Nonconforming',
|
||
|
'Gender Questioning',
|
||
|
'Gender Variant',
|
||
|
'Genderqueer',
|
||
|
'Intersex',
|
||
|
'Male to Female',
|
||
|
'MTF',
|
||
|
'Neither',
|
||
|
'Neutrois',
|
||
|
'Non-binary',
|
||
|
'Other',
|
||
|
'Pangender',
|
||
|
'Trans',
|
||
|
'Trans*',
|
||
|
'Trans Female',
|
||
|
'Trans* Female',
|
||
|
'Trans Male',
|
||
|
'Trans* Male',
|
||
|
'Trans Man',
|
||
|
'Trans* Man',
|
||
|
'Trans Person',
|
||
|
'Trans* Person',
|
||
|
'Trans Woman',
|
||
|
'Trans* Woman',
|
||
|
'Transfeminine',
|
||
|
'Transgender',
|
||
|
'Transgender Female',
|
||
|
'Transgender Male',
|
||
|
'Transgender Man',
|
||
|
'Transgender Person',
|
||
|
'Transgender Woman',
|
||
|
'Transmasculine',
|
||
|
'Transsexual',
|
||
|
'Transsexual Female',
|
||
|
'Transsexual Male',
|
||
|
'Transsexual Man',
|
||
|
'Transsexual Person',
|
||
|
'Transsexual Woman',
|
||
|
'Two-Spirit'
|
||
|
))
|
||
|
gnupg_fingerprint = StringField()
|
||
|
user_group = ReferenceField(Group)
|
||
|
payment_group = ReferenceField(Group)
|
||
|
|
||
|
|
||
|
|
||
|
|