class KeyMap(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) username = db.Column(db.String(16)) keys = db.Column(db.Text()) value = db.Column(db.Text()) def model_to_dict(self): return {"id": self.id, "keys": self.keys, "value": self.value}
class UserChatInformation(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) username = db.Column(db.String(16)) chat_information = db.Column(db.Text()) recv_information = db.Column(db.Text()) chat_time = db.Column(db.DateTime, default=datetime.datetime.now) def model_to_dict(self): return {"id": self.id, "name": self.username, "infor": self.chat_information,\ "recv": self.recv_information,"chat_time": self.chat_time}
class Post(db.Model): __tablename__ = "user_post" id = db.Column(db.Integer(), primary_key=True, autoincrement=True) title = db.Column(db.String(100)) text = db.Column(db.Text()) publish_date = db.Column(db.DateTime()) user_id = db.Column(db.Integer(), db.ForeignKey('user.id'))
class User(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(50)) title = db.Column(db.String(25)) body = db.Column(db.Text(250)) create_time = db.Columu(db.DateTime) #testt def save(self): db.session.add(self) db.session.commit()
class Company(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(128), unique=True) # 公司名称 info = db.Column(db.String(1000)) # 单位简介 credentials = db.Column(db.String(2000)) # 资质情况 register_capital = db.Column(db.String(20)) # 注册资金 industry_type = db.Column(db.Integer, db.ForeignKey(Industry.id)) # 行业类别 records = db.relationship('Records', backref='company') # 已合作项目 contact_person = db.Column(db.String(128)) # 联系人 contacts = db.Column(db.String(128)) # 联系方式 contacts1 = db.Column(db.String(128)) # 联系方式2 recent_situation = db.Column(db.Text(256)) # 近三年情况 url = db.Column(db.String(1000)) # 公司网址 level = db.Column(db.Integer) # 评级
class AllData(db.Model): dbid = db.Column(db.INTEGER, primary_key=True) DBDSMID = db.Column(db.String(100)) Disease = db.Column(db.String(100)) DOID = db.Column(db.String(100)) Gene = db.Column(db.String(100)) GeneID = db.Column(db.String(100)) MIM = db.Column(db.String(100)) Map_Location = db.Column(db.String(100)) VariantType = db.Column(db.String(100)) Protein = db.Column(db.String(100)) cDNA = db.Column(db.String(100)) SNPID = db.Column(db.String(100)) CodonChange = db.Column(db.String(100)) RefseqTranscript = db.Column(db.String(255)) P_Value = db.Column(db.String(100)) Strand = db.Column(db.String(100)) GRCh38_Position = db.Column(db.String(100)) GRCh37_Position = db.Column(db.String(100)) Ref = db.Column(db.String(100)) Alt = db.Column(db.String(100)) Year = db.Column(db.String(100)) PMID = db.Column(db.String(100)) Ethnicity = db.Column(db.String(100)) Classification = db.Column(db.String(100)) StrengthOfEvidence = db.Column(db.String(255)) KeySentence = db.Column(db.Text()) PrDSM = db.Column(db.String(100)) TraP = db.Column(db.String(100)) PhD_SNPg = db.Column(db.String(100)) FATHMM_MKL = db.Column(db.String(100)) CADD = db.Column(db.String(100)) DANN = db.Column(db.String(100)) FATHMM_XF = db.Column(db.String(100)) priPhCons = db.Column(db.String(100)) mamPhCons = db.Column(db.String(100)) verPhCons = db.Column(db.String(100)) priPhyloP = db.Column(db.String(100)) mamPhyloP = db.Column(db.String(100)) verPhyloP = db.Column(db.String(100)) GerpS = db.Column(db.String(100)) TFBs = db.Column(db.String(100)) TE = db.Column(db.String(100)) dPSIZ = db.Column(db.String(100)) DSP = db.Column(db.String(100)) Source = db.Column(db.String(100)) Chromosome = db.Column(db.String(100))
class Records(db.Model): id = db.Column(db.Integer, primary_key=True) company_id = db.Column(db.Integer, db.ForeignKey(Company.id)) content = db.Column(db.Text(256))