|
@@ -26,4 +26,32 @@ class Incident(Base):
|
|
|
del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
|
|
|
|
|
|
class Config:
|
|
|
- orm_mode = True
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
+class IncidentTracking(Base):
|
|
|
+ __tablename__ = 'incident_tracking'
|
|
|
+
|
|
|
+ id = Column(Integer, autoincrement=True, primary_key=True)
|
|
|
+ incident_id = Column(Integer, nullable=False, comment='事件ID')
|
|
|
+ tracking_status = Column(String(100), nullable=False, comment='事件跟踪状态')
|
|
|
+ tracking_time = Column(DateTime, default=datetime.now, comment='事件跟踪时间')
|
|
|
+ notes = Column(String(500), default='', comment='备注')
|
|
|
+ recorded_by = Column(Integer, nullable=False, comment='记录用户ID')
|
|
|
+ del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
|
|
|
+
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
+class IncidentFile(Base):
|
|
|
+ __tablename__ = 'incident_file'
|
|
|
+
|
|
|
+ id = Column(Integer, autoincrement=True, primary_key=True)
|
|
|
+ file_name = Column(String(255), nullable=False, comment='文件名称')
|
|
|
+ file_name_desc = Column(String(255), nullable=False, comment='文件名称原名')
|
|
|
+ file_path = Column(String(255), nullable=False, comment='文件存储路径')
|
|
|
+ file_size = Column(String(50), comment='文件大小')
|
|
|
+ foreign_key = Column(String(50), comment='文件外键 --技术字段')
|
|
|
+ from_scenario = Column(String(50), comment='对应标识 --技术字段')
|
|
|
+ create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
|
|
|
+ update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
|
|
|
+ del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)') # 更新预案信息的时候 先将原有的进行备注删除
|