from sqlalchemy import create_engine, Column, BigInteger, String, Text, DateTime, CHAR,Integer,Float from database import Base from datetime import datetime class ThreeProofingResponsiblePerson(Base): __tablename__ = 'three_proofing_responsible_person' id = Column(Integer, primary_key=True, autoincrement=True) unit_id = Column(Integer, comment='单位ID') unit_name = Column(String(255), nullable=False, comment='单位名称') name = Column(String(255), nullable=False, comment='联系人') area_code2 = Column(String(255), nullable=False, comment='区划编码') area_code = Column(String(255), nullable=False, comment='区划编码') position = Column(String(255), nullable=True, comment='职务') phone = Column(String(50), comment='手机号码') telephone = Column(String(255), comment='办公电话') order_num = Column(Integer, default=100, comment='排序顺序') user_id = Column(Integer, comment='用户id') create_time = Column(DateTime, default=datetime.now, comment='数据创建时间') update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间') create_dept = Column(BigInteger, default=None, comment='创建部门') create_by = Column(BigInteger, default=None, comment='创建者') update_by = Column(BigInteger, default=None, comment='更新者') del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)') sign = Column(String, server_default='', default='', comment='HMACSM3数值') class Config: orm_mode = True class ThreeProofingResponsibleType(Base): __tablename__ = 'three_proofing_responsible_type' id = Column(Integer, primary_key=True, autoincrement=True) type_parent_id = Column(String(255), comment='责任类型id') type_name = Column(String(255), nullable=False, comment='责任类别') order_num = Column(Integer, default=100, comment='排序顺序') create_time = Column(DateTime, default=datetime.now, comment='数据创建时间') update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间') create_dept = Column(BigInteger, default=None, comment='创建部门') create_by = Column(BigInteger, default=None, comment='创建者') update_by = Column(BigInteger, default=None, comment='更新者') del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)') class Config: orm_mode = True class ThreeProofingResponsibleOtherType(Base): __tablename__ = 'three_proofing_responsible_other_type' id = Column(Integer, primary_key=True, autoincrement=True) type_parent_id = Column(String(255), comment='责任类型id') type_name = Column(String(255), nullable=False, comment='责任类别') order_num = Column(Integer, default=100, comment='排序顺序') create_time = Column(DateTime, default=datetime.now, comment='数据创建时间') update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间') create_dept = Column(BigInteger, default=None, comment='创建部门') create_by = Column(BigInteger, default=None, comment='创建者') update_by = Column(BigInteger, default=None, comment='更新者') del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)') class Config: orm_mode = True class ThreeProofingResponsiblePersonType(Base): __tablename__ = 'three_proofing_responsible_person_type' id = Column(Integer, primary_key=True, autoincrement=True) type_id = Column(String(255), comment='责任类别id') type_parent_id = Column(String(255), nullable=False, comment='责任类型id') person_id = Column(Integer, nullable=False, comment='责任人id') create_time = Column(DateTime, default=datetime.now, comment='数据创建时间') update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间') create_dept = Column(BigInteger, default=None, comment='创建部门') create_by = Column(BigInteger, default=None, comment='创建者') update_by = Column(BigInteger, default=None, comment='更新者') del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)') class Config: orm_mode = True class ThreeProofingResponsiblePersonOtherInfo(Base): __tablename__ = 'three_proofing_responsible_person_other_info' id = Column(Integer, primary_key=True, autoincrement=True) dept_name = Column(String(255), comment='单位名称') other_type_2_name = Column(String(255), comment='具体类型名称') denger_point_name = Column(String(255), comment='隐患点名称') type_parent_id = Column(String(255), nullable=False, comment='责任类型id') person_id = Column(Integer, nullable=False, comment='责任人id') create_time = Column(DateTime, default=datetime.now, comment='数据创建时间') update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间') create_dept = Column(BigInteger, default=None, comment='创建部门') create_by = Column(BigInteger, default=None, comment='创建者') update_by = Column(BigInteger, default=None, comment='更新者') del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)') class Config: orm_mode = True class ThreeProofingResponsiblePersonOtherType(Base): __tablename__ = 'three_proofing_responsible_person_other_type' id = Column(Integer, primary_key=True, autoincrement=True) other_type_id = Column(String(255), comment='其他责任类别id') type_parent_id = Column(String(255), nullable=False, comment='责任类型id') person_id = Column(Integer, nullable=False, comment='责任人id') create_time = Column(DateTime, default=datetime.now, comment='数据创建时间') update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间') create_dept = Column(BigInteger, default=None, comment='创建部门') create_by = Column(BigInteger, default=None, comment='创建者') update_by = Column(BigInteger, default=None, comment='更新者') del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)') class Config: orm_mode = True class ThreeProofingResponsiblePersonImportFileStatus(Base): __tablename__ = 'three_proofing_responsible_person_import_file_status' id = Column(Integer, primary_key=True, autoincrement=True, comment='ID') file_uuid = Column(String(255), nullable=False, comment='文件uuid名称') file_name = Column(String(255), nullable=False, comment='文件名称') error_num = Column(Integer, nullable=False,default=0, comment='错误数量') warning_num = Column(Integer, nullable=False,default=0,comment='警告数量') status = Column(String(50), nullable=False, comment='状态') create_time = Column(DateTime, default=datetime.now, comment='创建时间') update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间') user_id = Column(String(255), nullable=False, comment='操作账号') remark = Column(Text, comment='备注') class Config: orm_mode = True