123456789101112131415161718192021222324252627282930313233343536373839 |
- from sqlalchemy import create_engine, Column, BigInteger, String, Text, DateTime, CHAR,Integer
- from database import Base
- from datetime import datetime
- class RiskManagementInspectionUser(Base):
- __tablename__ = 'risk_management_inspection_user'
- id = Column(BigInteger, primary_key=True, autoincrement=True, comment='ID')
- user_id = Column(BigInteger, nullable=False, comment='用户ID')
- dept_id = Column(BigInteger, nullable=True, comment='部门ID')
- dept_name = Column(String(30), nullable=True, comment='部门名称')
- ancestors_names = Column(Text, nullable=True, comment='部门路径')
- user_name = Column(String(30), nullable=False, comment='用户账号')
- nick_name = Column(String(30), nullable=False, comment='用户昵称')
- phonenumber = Column(String(11), default='', comment='手机号码')
- area_code = Column(String(11), default='', comment='责任区划编码')
- area = Column(String(11), default='', comment='责任区划')
- del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
- create_dept = Column(BigInteger, default=None, comment='创建部门')
- create_by = Column(BigInteger, default=None, comment='创建者')
- create_time = Column(DateTime, default=datetime.now, comment='创建时间')
- update_by = Column(BigInteger, default=None, comment='更新者')
- update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间')
- remark = Column(String(500), default=None, comment='备注')
- yzy_account = Column(String(50), default=None, comment='粤政易账号')
- class GovdataArea(Base):
- __tablename__ = 'govdata_area'
- id = Column(Integer, primary_key=True, comment='ID')
- area_code = Column(String(20), nullable=True, comment='区划编码')
- area_name = Column(String(50), nullable=True, comment='区划名称')
- parent_code = Column(String(20), nullable=True, comment='父级区划编码')
- parent_id = Column(Integer, nullable=True, comment='父级ID')
- status = Column(String(2), nullable=True, comment='状态')
- create_time = Column(String(255), nullable=True, comment='创建时间')
|