three_proofing_responsible_base.py 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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_code2 = Column(String(255), nullable=False, comment='区划编码')
  11. area_code = Column(String(255), nullable=False, comment='区划编码')
  12. position = Column(String(255), nullable=True, comment='职务')
  13. phone = Column(String(50), comment='手机号码')
  14. telephone = Column(String(255), comment='办公电话')
  15. order_num = Column(Integer, default=100, comment='排序顺序')
  16. user_id = Column(Integer, comment='用户id')
  17. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  18. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  19. create_dept = Column(BigInteger, default=None, comment='创建部门')
  20. create_by = Column(BigInteger, default=None, comment='创建者')
  21. update_by = Column(BigInteger, default=None, comment='更新者')
  22. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  23. sign = Column(String, server_default='', default='', comment='HMACSM3数值')
  24. class Config:
  25. orm_mode = True
  26. class ThreeProofingResponsibleType(Base):
  27. __tablename__ = 'three_proofing_responsible_type'
  28. id = Column(Integer, primary_key=True, autoincrement=True)
  29. type_parent_id = Column(String(255), comment='责任类型id')
  30. type_name = Column(String(255), nullable=False, comment='责任类别')
  31. order_num = Column(Integer, default=100, comment='排序顺序')
  32. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  33. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  34. create_dept = Column(BigInteger, default=None, comment='创建部门')
  35. create_by = Column(BigInteger, default=None, comment='创建者')
  36. update_by = Column(BigInteger, default=None, comment='更新者')
  37. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  38. class Config:
  39. orm_mode = True
  40. class ThreeProofingResponsibleOtherType(Base):
  41. __tablename__ = 'three_proofing_responsible_other_type'
  42. id = Column(Integer, primary_key=True, autoincrement=True)
  43. type_parent_id = Column(String(255), comment='责任类型id')
  44. type_name = Column(String(255), nullable=False, comment='责任类别')
  45. order_num = Column(Integer, default=100, comment='排序顺序')
  46. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  47. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  48. create_dept = Column(BigInteger, default=None, comment='创建部门')
  49. create_by = Column(BigInteger, default=None, comment='创建者')
  50. update_by = Column(BigInteger, default=None, comment='更新者')
  51. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  52. class Config:
  53. orm_mode = True
  54. class ThreeProofingResponsiblePersonType(Base):
  55. __tablename__ = 'three_proofing_responsible_person_type'
  56. id = Column(Integer, primary_key=True, autoincrement=True)
  57. type_id = Column(String(255), comment='责任类别id')
  58. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  59. person_id = Column(Integer, nullable=False, comment='责任人id')
  60. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  61. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  62. create_dept = Column(BigInteger, default=None, comment='创建部门')
  63. create_by = Column(BigInteger, default=None, comment='创建者')
  64. update_by = Column(BigInteger, default=None, comment='更新者')
  65. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  66. class Config:
  67. orm_mode = True
  68. class ThreeProofingResponsiblePersonOtherInfo(Base):
  69. __tablename__ = 'three_proofing_responsible_person_other_info'
  70. id = Column(Integer, primary_key=True, autoincrement=True)
  71. dept_name = Column(String(255), comment='单位名称')
  72. other_type_2_name = Column(String(255), comment='具体类型名称')
  73. denger_point_name = Column(String(255), comment='隐患点名称')
  74. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  75. person_id = Column(Integer, nullable=False, comment='责任人id')
  76. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  77. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  78. create_dept = Column(BigInteger, default=None, comment='创建部门')
  79. create_by = Column(BigInteger, default=None, comment='创建者')
  80. update_by = Column(BigInteger, default=None, comment='更新者')
  81. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  82. class Config:
  83. orm_mode = True
  84. class ThreeProofingResponsiblePersonOtherType(Base):
  85. __tablename__ = 'three_proofing_responsible_person_other_type'
  86. id = Column(Integer, primary_key=True, autoincrement=True)
  87. other_type_id = Column(String(255), comment='其他责任类别id')
  88. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  89. person_id = Column(Integer, nullable=False, comment='责任人id')
  90. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  91. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  92. create_dept = Column(BigInteger, default=None, comment='创建部门')
  93. create_by = Column(BigInteger, default=None, comment='创建者')
  94. update_by = Column(BigInteger, default=None, comment='更新者')
  95. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  96. class Config:
  97. orm_mode = True
  98. class ThreeProofingResponsiblePersonImportFileStatus(Base):
  99. __tablename__ = 'three_proofing_responsible_person_import_file_status'
  100. id = Column(Integer, primary_key=True, autoincrement=True, comment='ID')
  101. file_uuid = Column(String(255), nullable=False, comment='文件uuid名称')
  102. file_name = Column(String(255), nullable=False, comment='文件名称')
  103. error_num = Column(Integer, nullable=False,default=0, comment='错误数量')
  104. warning_num = Column(Integer, nullable=False,default=0,comment='警告数量')
  105. status = Column(String(50), nullable=False, comment='状态')
  106. create_time = Column(DateTime, default=datetime.now, comment='创建时间')
  107. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间')
  108. user_id = Column(String(255), nullable=False, comment='操作账号')
  109. remark = Column(Text, comment='备注')
  110. class Config:
  111. orm_mode = True