Forráskód Böngészése

事件管理表结构

baoyubo 10 hónapja
szülő
commit
c84ad8d435
1 módosított fájl, 29 hozzáadás és 1 törlés
  1. 29 1
      models/Incident_base.py

+ 29 - 1
models/Incident_base.py

@@ -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代表删除)')  # 更新预案信息的时候 先将原有的进行备注删除