three_proofing_responsible_base.py 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 ThreeProofingResponsiblePersonType(Base):
  35. __tablename__ = 'three_proofing_responsible_person_type'
  36. id = Column(Integer, primary_key=True, autoincrement=True)
  37. type_id = Column(String(255), comment='责任类别id')
  38. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  39. person_id = Column(Integer, nullable=False, comment='责任人id')
  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代表删除)')