class Account(COL.Collection): _properties = {"keyOptions": {"allowUserKeys": True, "type": "string"}} _fields = { 'email': COL.Field(validators=[VAL.NotNull()]), 'password': COL.Field(validators=[VAL.NotNull()]), 'user': COL.Field(validators=[VAL.NotNull()]) }
class Patients(col.Collection): _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': True # allow fields that are not part of the schema } _fields = { 'email': col.Field( validators=[val.NotNull(), val.Email(), PatientEmailUniqueVal()]), 'password': col.Field(validators=[val.NotNull()]), 'first_name': col.Field(validators=[val.NotNull()]), 'last_name': col.Field(validators=[val.NotNull()]), 'birth_date': col.Field(validators=[val.NotNull(), DatetimePastVal()]), 'ssn': col.Field(validators=[val.NotNull(), SSNVal()]), 'address': col.Field(validators=[val.NotNull(), AddressVal()]), 'phone_number': col.Field(validators=[val.NotNull()]), 'security_questions': col.Field( validators=[val.NotNull(), SecurityQuestionsVal()]), }
class Contacts(COL.Collection): _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': False } _fields = { "email": COL.Field(validators=[VAL.NotNull(), VAL.Email()]), "nbDownloads": COL.Field(validators=[VAL.NotNull()], default=1) }
class Users(COL.Collection): _validation = { 'on_save': False, 'on_set': False, 'allow_foreign_fields': True } _fields = { 'name': COL.Field(validators=[VAL.NotNull()]), 'password': COL.Field(validators=[VAL.NotNull()]), 'desc': COL.Field(validators=[VAL.NotNull()]) }
class Facilities(col.Collection): _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': True # allow fields that are not part of the schema } _fields = { 'model': col.Field(validators=[val.NotNull()]), 'description': col.Field(validators=[val.NotNull()]) }
class Data(COL.Collection): _validation = { 'on_save': False, 'on_set': False, 'allow_foreign_fields': True } _fields = { 'name': COL.Field(validators=[VAL.NotNull()]), 'owner': COL.Field(validators=[VAL.NotNull()]), 'format': COL.Field(validators=[VAL.NotNull()]), 'size': COL.Field(validators=[VAL.NotNull()]) }
class Projects(COL.Collection): _validation = { 'on_save': False, 'on_set': False, 'allow_foreign_fields': True } _fields = { 'name': COL.Field( validators=[VAL.NotNull(), validation.String_val()]), 'owner': COL.Field(validators=[VAL.NotNull()]), }
class IsAppointed(col.Collection): _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': True # allow fields that are not part of the schema } _fields = { '_from': col.Field(validators=[val.NotNull()]), '_to': col.Field(validators=[val.NotNull()]) }
class Visitors(col.Collection): _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': True # allow fields that are not part of the schema } _fields = { 'first_name': col.Field(validators=[val.NotNull()]), 'last_name': col.Field(validators=[val.NotNull()]), 'registered': col.Field(validators=[val.Bool()]), 'visited_date': col.Field(validators=[val.NotNull(), DatetimeVal()]), }
class Channel(COL.Collection): _properties = { "keyOptions": { "allowUserKeys": False, "type": "autoincrement", "increment": 1, "offset": 0, } } _fields = { 'name': COL.Field(validators=[VAL.NotNull()]), 'type': COL.Field(validators=[VAL.NotNull()]), 'active': COL.Field(validators=[VAL.NotNull()]), 'port': COL.Field() }
class Server(COL.Collection): _properties = { "keyOptions": { "allowUserKeys": False, "type": "autoincrement", "increment": 1, "offset": 0, } } _fields = { 'name': COL.Field(validators=[VAL.NotNull()]), 'owner': COL.Field(validators=[VAL.NotNull()]), 'channels': COL.Field(), 'roles': COL.Field(), 'ip': COL.Field(validators=[VAL.NotNull()]) }
class Tips(col.Collection): _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': True # allow fields that are not part of the schema } _fields = {'name': col.Field(validators=[val.NotNull()])}
class Tasks(COL.Collection): _validation = { 'on_save': False, 'on_set': False, 'allow_foreign_fields': True } _fields = { 'name': COL.Field(validators=[VAL.NotNull()]), }
class LeaveApply(col.Collection): _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': True # allow fields that are not part of the schema } _fields = { 'member': col.Field(validators=[val.NotNull(), StaffIDExists()]), 'leave_reason': col.Field(validators=[val.NotNull(), val.String]), 'beginning_date': col.Field(validators=[val.NotNull(), DatetimeVal()]), 'ending_date': col.Field(validators=[val.NotNull(), DatetimeVal()]), 'status': col.Field(validators=[val.NotNull()]) }
class Peptides(COL.Collection): _properties = { "keyOptions": { "allowUserKeys": False, "type": "autoincrement", "increment": 1, "offset": 0, } } _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': True } _fields = { "Index": COL.Field(validators=[VAL.NotNull()]), "Method": COL.Field(validators=[VAL.NotNull()]), "Context_size": COL.Field(validators=[VAL.NotNull()]), "Model_run": COL.Field(validators=[VAL.NotNull()]), "Accession": COL.Field(validators=[VAL.NotNull()]), "Sub_accession": COL.Field(validators=[VAL.NotNull()]), "Position": COL.Field(validators=[VAL.NotNull()]), "Length": COL.Field(validators=[VAL.NotNull()]), "Sequence": COL.Field(validators=[VAL.NotNull()]), "Score": COL.Field(validators=[VAL.NotNull()]) } _field_types = { "Index": "float", "Method": "enumeration", "Context_size": "enumeration", "Model_run": "enumeration", "Accession": "enumeration", "Sub_accession": "enumeration", "Position": "float", "Length": "enumeration", "Score": "float", "Sequence": "enumeration", }
class User(COL.Collection): _properties = { "keyOptions": { "allowUserKeys": False, "type": "autoincrement", "increment": 1, "offset": 0, } } _fields = {'username': COL.Field(validators=[VAL.NotNull()])}
class VirusSequences(COL.Collection): #_properties = { # "keyOptions" : { # "allowUserKeys": False, # "type": "autoincrement", # "increment": 1, # "offset": 0, # } #} _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': True } _fields = { "Index": COL.Field(validators=[VAL.NotNull()]), 'Accession': COL.Field(validators=[VAL.NotNull()]), 'Sequence': COL.Field(validators=[VAL.NotNull()]), 'Version': COL.Field(), 'Sub_accession': COL.Field(), 'Protein_accession': COL.Field(), 'Release_Date': COL.Field(), 'Genus': COL.Field(), 'Family': COL.Field(), 'Length': COL.Field(), 'Nuc_Completeness': COL.Field(), 'Genotype': COL.Field(), 'Genome_Region': COL.Field(), 'Segment': COL.Field(), 'Authors': COL.Field(), 'Publications': COL.Field(), 'Geo_Location': COL.Field(), 'Host': COL.Field(), 'Authors': COL.Field(), 'Isolation_Source': COL.Field(), 'Collection_Date': COL.Field(), 'BioSample': COL.Field(), 'GenBank_Title': COL.Field(), } _field_types = { 'Index': 'float', 'Accession': "enumeration", # 'Sequence': "enumeration", 'Version': "enumeration", 'Sub_accession': "enumeration", 'Protein_accession': "enumeration", 'Release_Date': "enumeration", 'Genus': "enumeration", 'Family': "enumeration", 'Length': "float", 'Nuc_Completeness': "enumeration", 'Genotype': "enumeration", # 'Authors': COL.Field(), # 'Publications': COL.Field(), 'Geo_Location': "enumeration", 'Host': "enumeration", 'Isolation_Source': "enumeration", 'Collection_Date': "enumeration", 'BioSample': "enumeration", 'GenBank_Title': "enumeration", }
class Appointments(col.Collection): _validation = { 'on_save': True, 'on_set': True, 'allow_foreign_fields': True # allow fields that are not part of the schema } _fields = { 'patient': col.Field(validators=[val.NotNull(), PatientIDExists()]), 'doctor': col.Field(validators=[DoctorIDExists()]), 'symptoms': col.Field(validators=[val.NotNull()]), 'description': col.Field(validators=[val.NotNull()]), 'date_created': col.Field(validators=[val.NotNull(), DatetimeVal()]), 'since_when': col.Field(validators=[val.NotNull(), DatetimeVal()]), 'payment_type': col.Field(validators=[val.NotNull(), val.Enumeration(payment_types)]), 'payed': col.Field(validators=[val.NotNull(), val.Bool()]), 'urgent': col.Field(validators=[val.Bool()]), 'status': col.Field( validators=[val.NotNull(), val.Enumeration(appointment_status)]), 'appointment_date': col.Field(validators=[DatetimeVal()]), 'cancel_reason': col.Field(), 'reject_reason': col.Field(), }