three_proofing_responsible_base.py 5.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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_id = Column(String(255), comment='其他责任类别id')
  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代表删除)')