three_proofing_responsible_base.py 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. from sqlalchemy import create_engine, Column, BigInteger, String, Text, DateTime, CHAR,Integer,Float
  2. from database import Base
  3. from datetime import datetime
  4. class ThreeProofingResponsiblePerson(Base):
  5. __tablename__ = 'three_proofing_responsible_person'
  6. id = Column(Integer, primary_key=True, autoincrement=True)
  7. unit_id = Column(Integer, comment='单位ID')
  8. unit_name = Column(String(255), nullable=False, comment='单位名称')
  9. name = Column(String(255), nullable=False, comment='联系人')
  10. area_code = Column(String(255), nullable=False, comment='区划编码')
  11. position = Column(String(255), nullable=True, comment='职务')
  12. phone = Column(String(50), comment='手机号码')
  13. telephone = Column(String(255), comment='办公电话')
  14. order_num = Column(Integer, default=100, comment='排序顺序')
  15. user_id = Column(Integer, comment='用户id')
  16. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  17. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  18. create_dept = Column(BigInteger, default=None, comment='创建部门')
  19. create_by = Column(BigInteger, default=None, comment='创建者')
  20. update_by = Column(BigInteger, default=None, comment='更新者')
  21. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  22. class ThreeProofingResponsibleType(Base):
  23. __tablename__ = 'three_proofing_responsible_type'
  24. id = Column(Integer, primary_key=True, autoincrement=True)
  25. type_parent_id = Column(String(255), comment='责任类型id')
  26. type_name = Column(String(255), nullable=False, comment='责任类别')
  27. order_num = Column(Integer, default=100, comment='排序顺序')
  28. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  29. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  30. create_dept = Column(BigInteger, default=None, comment='创建部门')
  31. create_by = Column(BigInteger, default=None, comment='创建者')
  32. update_by = Column(BigInteger, default=None, comment='更新者')
  33. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  34. class ThreeProofingResponsibleOtherType(Base):
  35. __tablename__ = 'three_proofing_responsible_other_type'
  36. id = Column(Integer, primary_key=True, autoincrement=True)
  37. type_parent_id = Column(String(255), comment='责任类型id')
  38. type_name = Column(String(255), nullable=False, comment='责任类别')
  39. order_num = Column(Integer, default=100, comment='排序顺序')
  40. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  41. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  42. create_dept = Column(BigInteger, default=None, comment='创建部门')
  43. create_by = Column(BigInteger, default=None, comment='创建者')
  44. update_by = Column(BigInteger, default=None, comment='更新者')
  45. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  46. class ThreeProofingResponsiblePersonType(Base):
  47. __tablename__ = 'three_proofing_responsible_person_type'
  48. id = Column(Integer, primary_key=True, autoincrement=True)
  49. type_id = Column(String(255), comment='责任类别id')
  50. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  51. person_id = Column(Integer, nullable=False, comment='责任人id')
  52. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  53. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  54. create_dept = Column(BigInteger, default=None, comment='创建部门')
  55. create_by = Column(BigInteger, default=None, comment='创建者')
  56. update_by = Column(BigInteger, default=None, comment='更新者')
  57. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  58. class ThreeProofingResponsiblePersonOtherInfo(Base):
  59. __tablename__ = 'three_proofing_responsible_person_other_info'
  60. id = Column(Integer, primary_key=True, autoincrement=True)
  61. dept_name = Column(String(255), comment='单位名称')
  62. other_type_2_name = Column(String(255), comment='具体类型名称')
  63. denger_point_name = Column(String(255), comment='隐患点名称')
  64. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  65. person_id = Column(Integer, nullable=False, comment='责任人id')
  66. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  67. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  68. create_dept = Column(BigInteger, default=None, comment='创建部门')
  69. create_by = Column(BigInteger, default=None, comment='创建者')
  70. update_by = Column(BigInteger, default=None, comment='更新者')
  71. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  72. class ThreeProofingResponsiblePersonOtherType(Base):
  73. __tablename__ = 'three_proofing_responsible_person_other_type'
  74. id = Column(Integer, primary_key=True, autoincrement=True)
  75. other_type_id = Column(String(255), comment='其他责任类别id')
  76. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  77. person_id = Column(Integer, nullable=False, comment='责任人id')
  78. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  79. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  80. create_dept = Column(BigInteger, default=None, comment='创建部门')
  81. create_by = Column(BigInteger, default=None, comment='创建者')
  82. update_by = Column(BigInteger, default=None, comment='更新者')
  83. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  84. class ThreeProofingResponsiblePersonImportFileStatus(Base):
  85. __tablename__ = 'three_proofing_responsible_person_import_file_status'
  86. id = Column(Integer, primary_key=True, autoincrement=True, comment='ID')
  87. file_uuid = Column(String(255), nullable=False, comment='文件uuid名称')
  88. file_name = Column(String(255), nullable=False, comment='文件名称')
  89. status = Column(String(50), nullable=False, comment='状态')
  90. create_time = Column(DateTime, default=datetime.now, comment='创建时间')
  91. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间')
  92. user_id = Column(String(255), nullable=False, comment='操作账号')
  93. remark = Column(Text, comment='备注')