three_proofing_responsible_base.py 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. class ThreeProofingResponsibleType(Base):
  24. __tablename__ = 'three_proofing_responsible_type'
  25. id = Column(Integer, primary_key=True, autoincrement=True)
  26. type_parent_id = Column(String(255), comment='责任类型id')
  27. type_name = Column(String(255), nullable=False, comment='责任类别')
  28. order_num = Column(Integer, default=100, comment='排序顺序')
  29. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  30. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  31. create_dept = Column(BigInteger, default=None, comment='创建部门')
  32. create_by = Column(BigInteger, default=None, comment='创建者')
  33. update_by = Column(BigInteger, default=None, comment='更新者')
  34. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  35. class ThreeProofingResponsibleOtherType(Base):
  36. __tablename__ = 'three_proofing_responsible_other_type'
  37. id = Column(Integer, primary_key=True, autoincrement=True)
  38. type_parent_id = Column(String(255), comment='责任类型id')
  39. type_name = Column(String(255), nullable=False, comment='责任类别')
  40. order_num = Column(Integer, default=100, comment='排序顺序')
  41. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  42. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  43. create_dept = Column(BigInteger, default=None, comment='创建部门')
  44. create_by = Column(BigInteger, default=None, comment='创建者')
  45. update_by = Column(BigInteger, default=None, comment='更新者')
  46. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  47. class ThreeProofingResponsiblePersonType(Base):
  48. __tablename__ = 'three_proofing_responsible_person_type'
  49. id = Column(Integer, primary_key=True, autoincrement=True)
  50. type_id = Column(String(255), comment='责任类别id')
  51. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  52. person_id = Column(Integer, nullable=False, comment='责任人id')
  53. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  54. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  55. create_dept = Column(BigInteger, default=None, comment='创建部门')
  56. create_by = Column(BigInteger, default=None, comment='创建者')
  57. update_by = Column(BigInteger, default=None, comment='更新者')
  58. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  59. class ThreeProofingResponsiblePersonOtherInfo(Base):
  60. __tablename__ = 'three_proofing_responsible_person_other_info'
  61. id = Column(Integer, primary_key=True, autoincrement=True)
  62. dept_name = Column(String(255), comment='单位名称')
  63. other_type_2_name = Column(String(255), comment='具体类型名称')
  64. denger_point_name = Column(String(255), comment='隐患点名称')
  65. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  66. person_id = Column(Integer, nullable=False, comment='责任人id')
  67. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  68. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  69. create_dept = Column(BigInteger, default=None, comment='创建部门')
  70. create_by = Column(BigInteger, default=None, comment='创建者')
  71. update_by = Column(BigInteger, default=None, comment='更新者')
  72. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  73. class ThreeProofingResponsiblePersonOtherType(Base):
  74. __tablename__ = 'three_proofing_responsible_person_other_type'
  75. id = Column(Integer, primary_key=True, autoincrement=True)
  76. other_type_id = Column(String(255), comment='其他责任类别id')
  77. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  78. person_id = Column(Integer, nullable=False, comment='责任人id')
  79. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  80. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  81. create_dept = Column(BigInteger, default=None, comment='创建部门')
  82. create_by = Column(BigInteger, default=None, comment='创建者')
  83. update_by = Column(BigInteger, default=None, comment='更新者')
  84. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  85. class ThreeProofingResponsiblePersonImportFileStatus(Base):
  86. __tablename__ = 'three_proofing_responsible_person_import_file_status'
  87. id = Column(Integer, primary_key=True, autoincrement=True, comment='ID')
  88. file_uuid = Column(String(255), nullable=False, comment='文件uuid名称')
  89. file_name = Column(String(255), nullable=False, comment='文件名称')
  90. error_num = Column(Integer, nullable=False,default=0, comment='错误数量')
  91. warning_num = Column(Integer, nullable=False,default=0,comment='警告数量')
  92. status = Column(String(50), nullable=False, comment='状态')
  93. create_time = Column(DateTime, default=datetime.now, comment='创建时间')
  94. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间')
  95. user_id = Column(String(255), nullable=False, comment='操作账号')
  96. remark = Column(Text, comment='备注')