123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- 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='创建时间')
- class RiskManagementInspectionTask(Base):
- __tablename__ = 'risk_management_inspection_task'
- id = Column(BigInteger, primary_key=True, autoincrement=True, comment='ID')
- task_number = Column(String(50), comment='任务编号')
- inspection_business = Column(String(255), nullable=True, comment='巡查业务,城市隐患巡查、森林防火巡查、重点危化企业巡查、重点水库水位巡查')
- start_time = Column(DateTime, nullable=True, comment='巡查开始时间')
- end_time = Column(DateTime, nullable=True, comment='巡查结束时间')
- inspection_cycle = Column(String(50), nullable=True, comment='巡查周期,每年、每月、每周、每日、一次')
- corn_expression = Column(String(100), nullable=True, comment='corn表达式')
- inspection_range = Column(String(50), nullable=True, comment='巡查范围,市级、区县级、镇街级、村居级')
- task_status = Column(String(20), nullable=True, 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='备注')
- class RiskManagementRiskTask(Base):
- __tablename__ = 'risk_management_risk_task'
- id = Column(BigInteger, primary_key=True, autoincrement=True, comment='ID')
- task_number = Column(String(50), nullable=True, comment='任务编号')
- risk_type = Column(String(255), nullable=True, comment='风险源类型,风险源排查、隐患源排查、危险源排查')
- start_time = Column(DateTime, nullable=True, comment='排查开始时间')
- end_time = Column(DateTime, nullable=True, comment='排查结束时间')
- task_cycle = Column(String(50), nullable=True, comment='排查周期,每年、每月、每周、每日、一次')
- corn_expression = Column(String(100), nullable=True, comment='corn表达式')
- task_range = Column(String(50), nullable=True, comment='巡查范围,市级、区县级、镇街级、村居级')
- task_status = Column(String(20), nullable=True, 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='备注')
|