three_proofing_responsible_base.py 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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), nullable=True, comment='手机号码')
  13. order_num = Column(Integer, default=100, comment='排序顺序')
  14. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  15. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  16. create_dept = Column(BigInteger, default=None, comment='创建部门')
  17. create_by = Column(BigInteger, default=None, comment='创建者')
  18. update_by = Column(BigInteger, default=None, comment='更新者')
  19. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  20. class ThreeProofingResponsibleType(Base):
  21. __tablename__ = 'three_proofing_responsible_type'
  22. id = Column(Integer, primary_key=True, autoincrement=True)
  23. type_parent_id = Column(String(255), comment='责任类型id')
  24. type_name = Column(String(255), nullable=False, comment='责任类别')
  25. order_num = Column(Integer, default=100, comment='排序顺序')
  26. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  27. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  28. create_dept = Column(BigInteger, default=None, comment='创建部门')
  29. create_by = Column(BigInteger, default=None, comment='创建者')
  30. update_by = Column(BigInteger, default=None, comment='更新者')
  31. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  32. class ThreeProofingResponsiblePersonType(Base):
  33. __tablename__ = 'three_proofing_responsible_person_type'
  34. id = Column(Integer, primary_key=True, autoincrement=True)
  35. type_id = Column(String(255), comment='责任类别id')
  36. type_parent_id = Column(String(255), nullable=False, comment='责任类型id')
  37. person_id = Column(Integer, nullable=False, comment='责任人id')
  38. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  39. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  40. create_dept = Column(BigInteger, default=None, comment='创建部门')
  41. create_by = Column(BigInteger, default=None, comment='创建者')
  42. update_by = Column(BigInteger, default=None, comment='更新者')
  43. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')