class Rcs_Parameter(db.Model): __tablename__ = 'rcs_parameter' id = db.Column(db.Integer, primary_key=True) parameter_name = db.Column(db.String(32)) parameter_value = db.Column(db.String(5000)) def __init__(self, parameter_name, parameter_value): self.parameter_name = parameter_name self.parameter_value = parameter_value def add(self): db.session.add(self)
class Rcs_Application_Score(db.Model): __tablename__ = 'rcs_application_score' id = db.Column(db.Integer, primary_key=True) application_id = db.Column(db.Integer) ddpz_score = db.Column(db.String(32)) hknl_score = db.Column(db.String(32)) jyzk_score = db.Column(db.String(32)) shzk_score = db.Column(db.String(32)) def __init__(self, application_id,ddpz_score,hknl_score,jyzk_score,shzk_score): self.application_id = application_id self.ddpz_score = ddpz_score self.hknl_score = hknl_score self.jyzk_score = jyzk_score self.shzk_score = shzk_score def add(self): db.session.add(self)
class Rcs_Application_Advice(db.Model): __tablename__ = 'rcs_application_advice' id = db.Column(db.Integer, primary_key=True) application_id = db.Column(db.Integer) approve_advice = db.Column(db.String(255)) approve_result = db.Column(db.String(32)) approve_ed = db.Column(db.String(32)) user_id = db.Column(db.String(32)) def __init__(self, application_id, approve_advice, approve_result, approve_ed, user_id): self.application_id = application_id self.approve_advice = approve_advice self.approve_result = approve_result self.approve_ed = approve_ed self.user_id = user_id def add(self): db.session.add(self)
class Role(db.Model): __tablename__ = 'rcs_role' id = db.Column(db.Integer, primary_key=True) role_name = db.Column(db.String(16)) role_level = db.Column(db.Integer) def __init__(self, role_name, role_level): self.role_name = role_name self.role_level = role_level def add(self): db.session.add(self)
class Apply(db.Model): __tablename__ = 'apply' id = db.Column(db.Integer, primary_key=True) login_name = db.Column(db.String(16)) login_password = db.Column(db.String(32)) real_name = db.Column(db.String(32)) sex = db.Column(db.String(1)) mobile = db.Column(db.String(16)) active = db.Column(db.String(1)) create_user = db.Column(db.Integer) create_date = db.Column(db.DateTime) modify_user = db.Column(db.Integer) modify_date = db.Column(db.DateTime) email = db.Column(db.String(100)) def __init__(self, login_name, login_password, real_name, sex, mobile, active, email): self.login_name = login_name self.login_password = login_password self.real_name = real_name self.sex = sex self.mobile = mobile self.active = active self.create_user = current_user.id self.create_date = datetime.datetime.now() self.modify_user = current_user.id self.modify_date = datetime.datetime.now() self.email = email def add(self): db.session.add(self) # flask-login 需要的4个函数---start def is_authenticated(self): return True def is_active(self): return True def is_anonymous(self): return False def get_id(self): return unicode(self.id)
class Rcs_Application_Info(db.Model): __tablename__ = 'rcs_application_info' id = db.Column(db.Integer, primary_key=True) customer_id = db.Column(db.Integer) customer_name = db.Column(db.String(32)) card_id = db.Column(db.Integer) product_name = db.Column(db.String(32)) approve_je = db.Column(db.String(32)) approve_org = db.Column(db.String(32)) approve_area = db.Column(db.String(32)) industry = db.Column(db.String(32)) district = db.Column(db.String(32)) user_name = db.Column(db.String(32)) sh_name = db.Column(db.String(32)) sp_name = db.Column(db.String(32)) approve_type = db.Column(db.String(1)) pet = db.Column(db.String(32)) def __init__(self, customer_id, customer_name, card_id, product_name, approve_je, approve_org, approve_area, industry, district, user_name, sh_name, sp_name, approve_type, pet): self.customer_id = customer_id self.customer_name = customer_name self.card_id = card_id self.product_name = product_name self.approve_je = approve_je self.approve_org = approve_org self.approve_area = approve_area self.industry = industry self.district = district self.user_name = user_name self.sh_name = sh_name self.sp_name = sp_name self.approve_type = approve_type self.pet = pet def add(self): db.session.add(self)
class Rcs_Customer_Information(db.Model): __tablename__ = 'rcs_customer_information' id = db.Column(db.Integer, primary_key=True) customer_name = db.Column(db.String(255)) customer_type = db.Column(db.String(255)) area = db.Column(db.String(255)) yyzz_id = db.Column(db.String(255)) zzjg_id = db.Column(db.String(255)) zczb_capital = db.Column(db.String(255)) sszb_capital = db.Column(db.String(255)) create_time = db.Column(db.String(255)) zcdz_address = db.Column(db.String(255)) bgdz_address = db.Column(db.String(255)) gswz_online = db.Column(db.String(255)) frdb_name = db.Column(db.String(255)) frdb_position = db.Column(db.String(255)) frdb_phone = db.Column(db.String(255)) frdb_email = db.Column(db.String(255)) enterprise_name = db.Column(db.String(255)) enterprise_position = db.Column(db.String(255)) enterprise_phone = db.Column(db.String(255)) enterprise_email = db.Column(db.String(255)) def __init__(self, customer_name, customer_type, area, yyzz_id, zzjg_id, zczb_capital, sszb_capital, create_time, zcdz_address, bgdz_address, gswz_online, frdb_name, frdb_position, frdb_phone, frdb_email, enterprise_name, enterprise_position, enterprise_phone, enterprise_email): self.customer_name = customer_name self.customer_type = customer_type self.area = area self.yyzz_id = yyzz_id self.zzjg_id = zzjg_id self.zczb_capital = zczb_capital self.sszb_capital = sszb_capital self.create_time = create_time self.zcdz_address = zcdz_address self.bgdz_address = bgdz_address self.gswz_online = gswz_online self.frdb_name = frdb_name self.frdb_position = frdb_position self.frdb_phone = frdb_phone self.frdb_email = frdb_email self.enterprise_name = enterprise_name self.enterprise_position = enterprise_position self.enterprise_phone = enterprise_phone self.enterprise_email = enterprise_email def add(self): db.session.add(self)
class User(db.Model): __tablename__ = 'rcs_user' id = db.Column(db.Integer, primary_key=True) login_name = db.Column(db.String(16)) login_password = db.Column(db.String(32)) real_name = db.Column(db.String(32)) sex = db.Column(db.String(1)) mobile = db.Column(db.String(16)) active = db.Column(db.String(1)) create_user = db.Column(db.Integer) create_date = db.Column(db.DateTime) modify_user = db.Column(db.Integer) modify_date = db.Column(db.DateTime) email = db.Column(db.String(100)) card_id = db.Column(db.String(32)) zjzz = db.Column(db.String(32)) remark1 = db.Column(db.String(255)) zjqx = db.Column(db.String(32)) remark2 = db.Column(db.String(255)) bhxx = db.Column(db.String(32)) remark3 = db.Column(db.String(255)) user_type = db.Column(db.String(1)) role = db.Column(db.String(32)) def __init__(self, login_name, login_password, real_name, sex, mobile, active, email, card_id, zjzz, remark1, zjqx, remark2, bhxx, remark3, user_type, role): self.login_name = login_name self.login_password = login_password self.real_name = real_name self.sex = sex self.mobile = mobile self.active = active self.create_date = datetime.datetime.now() self.modify_date = datetime.datetime.now() self.email = email self.card_id = card_id self.zjzz = zjzz self.remark1 = remark1 self.zjqx = zjqx self.remark2 = remark2 self.bhxx = bhxx self.remark3 = remark3 self.user_type = user_type self.role = role def add(self): db.session.add(self) # flask-login 需要的4个函数---start def is_authenticated(self): return True def is_active(self): return True def is_anonymous(self): return False def get_id(self): return unicode(self.id)