|
@@ -26,18 +26,64 @@ class TaskRegistration(Base):
|
|
|
registrar = Column(String(255), nullable=False,comment='登记人')
|
|
|
registrar_id = Column(String(255), nullable=False,comment='登记人ID')
|
|
|
creation_time = Column(DateTime, default=datetime.now,comment='创建时间')
|
|
|
- update_time = Column(DateTime, default=datetime.now,comment='创建时间')
|
|
|
+ update_time = Column(DateTime, default=datetime.now,comment='更新时间')
|
|
|
processing_status = Column(String(50), default='处理中',comment='任务状态')
|
|
|
event_code = Column(String(50), nullable=False,comment='关联事件ID')
|
|
|
task_type = Column(String(1), default='0', server_default='0', comment='任务类型 0 事件处置 1 防范措施 2 险情处理 3 督办任务')
|
|
|
+ expire_time = Column(DateTime, comment='完成时限')
|
|
|
+ feeback_user = Column(String(150), default='', server_default='', comment='反馈人员')
|
|
|
|
|
|
# 你可以添加更多的字段和关系,例如与用户模型的外键关系
|
|
|
# user_id = Column(Integer, ForeignKey('users.id'))
|
|
|
# user = relationship("User", back_populates="task_registrations")
|
|
|
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
class TaskUnit(Base):
|
|
|
__tablename__ = 'task_unit'
|
|
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True, index=True,comment='id')
|
|
|
unit_name = Column(String(255), nullable=False, comment='部门名称')
|
|
|
- unit_duty = Column(Text, nullable=False,comment='部门职责')
|
|
|
+ unit_duty = Column(Text, nullable=False,comment='部门职责')
|
|
|
+
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
+class TaskFeeback(Base):
|
|
|
+ __tablename__ = 'task_feeback'
|
|
|
+
|
|
|
+ id = Column(Integer, primary_key=True, autoincrement=True, index=True,comment='id')
|
|
|
+ task_id = Column(String(255), index=True,comment='任务ID')
|
|
|
+ recorded_by = Column(Integer, nullable=False, comment='记录用户ID')
|
|
|
+ feeback_user = Column(String(150), default='', server_default='', comment='反馈人员')
|
|
|
+ content = Column(Text, comment='反馈内容')
|
|
|
+ processing_status = Column(String(50), default='处理中',comment='任务状态')
|
|
|
+ create_time = Column(DateTime, default=datetime.now, comment='登记时间')
|
|
|
+ feeback_type = Column(String(1), default='0', server_default='0', comment='反馈类型 0 任务反馈 1 领导批示')
|
|
|
+ leader_unit = Column(String(150), default='', server_default='', comment='领导单位')
|
|
|
+ leader_name = Column(String(150), default='', server_default='', comment='领导姓名')
|
|
|
+
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
+class TaskFile(Base):
|
|
|
+ __tablename__ = 'task_file'
|
|
|
+
|
|
|
+ id = Column(Integer, primary_key=True, autoincrement=True)
|
|
|
+ file_id = Column(String(50), nullable=False, comment='文件id')
|
|
|
+ file_name = Column(String(255), nullable=False, comment='文件名称')
|
|
|
+ file_name_desc = Column(String(255), nullable=False, comment='文件名称原名')
|
|
|
+ file_path = Column(String(255), nullable=True, comment='文件存储路径')
|
|
|
+ file_size = Column(String(50), nullable=True, comment='文件大小')
|
|
|
+ status = Column(String(50), nullable=True, comment='文件状态')
|
|
|
+ foreign_key = Column(String(50), nullable=True, comment='文件外键 --技术字段')
|
|
|
+ from_scenario = Column(String(50), nullable=True, comment='对应标识 --技术字段')
|
|
|
+ del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
|
|
|
+ create_dept = Column(Integer, default=None, comment='创建部门')
|
|
|
+ create_by = Column(Integer, default=None, comment='创建者')
|
|
|
+ create_time = Column(DateTime, default=datetime.now, comment='创建时间')
|
|
|
+ update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='更新时间')
|
|
|
+
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|