company_management_base.py 1.8 KB

12345678910111213141516171819202122232425262728
  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 CompanyManagementBaseInfo(Base):
  5. __tablename__ = 'company_management_base_info'
  6. id = Column(Integer, primary_key=True, nullable=False, autoincrement=True)
  7. company_code = Column(String(255), default=None, comment='企业统一社会信用代码')
  8. company_name = Column(String(255), nullable=False, comment='企业名称')
  9. province = Column(String(255), nullable=False, comment='辖区省')
  10. province_code = Column(String(255), nullable=False, comment='辖区省区划编码')
  11. city = Column(String(255), nullable=False, comment='辖区市')
  12. city_code = Column(String(255), nullable=False, comment='辖区市区划编码')
  13. district = Column(String(255), nullable=False, comment='辖区区县')
  14. district_code = Column(String(255), nullable=False, comment='辖区区县区划编码')
  15. company_address = Column(String(255), nullable=False, comment='企业地址')
  16. responsible_person = Column(String(255), nullable=False, comment='联系人')
  17. company_type = Column(String(255), default=None, comment='企业类型')
  18. phone = Column(String(20), default=None, comment='移动电话')
  19. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  20. create_dept = Column(BigInteger, default=None, comment='创建部门')
  21. create_by = Column(BigInteger, default=None, comment='创建者')
  22. create_time = Column(DateTime, default=datetime.now, comment='创建时间')
  23. update_by = Column(BigInteger, default=None, comment='更新者')
  24. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间')
  25. remark = Column(String(500), default=None, comment='备注')