|
@@ -53,6 +53,8 @@ class EmergencyFile(Base):
|
|
|
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='数据更新时间')
|
|
|
+ create_dept = Column(BigInteger, default=None, comment='创建部门')
|
|
|
+ create_by = Column(BigInteger, default=None, comment='创建者')
|
|
|
del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)') #更新预案信息的时候 先将原有的进行备注删除
|
|
|
|
|
|
# 关联到 EmergencyPlan 实例
|
|
@@ -75,6 +77,8 @@ class EmergencyDrill(Base):
|
|
|
planned_time = Column(DateTime, comment='计划演练时间')
|
|
|
create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
|
|
|
update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
|
|
|
+ create_dept = Column(BigInteger, default=None, comment='创建部门')
|
|
|
+ create_by = Column(BigInteger, default=None, comment='创建者')
|
|
|
del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
|
|
|
|
|
|
|
|
@@ -94,4 +98,28 @@ class EmergencyTrainingSession(Base):
|
|
|
training_lon = Column(Numeric(9, 6), comment='培训经度')
|
|
|
training_lat = Column(Numeric(9, 6), comment='培训纬度')
|
|
|
plan_number = Column(String(50), nullable=False,comment='预案编号')
|
|
|
- del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
|
|
|
+ create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
|
|
|
+ update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
|
|
|
+ create_dept = Column(BigInteger, default=None, comment='创建部门')
|
|
|
+ create_by = Column(BigInteger, default=None, comment='创建者')
|
|
|
+ del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
|
|
|
+
|
|
|
+
|
|
|
+class EmergencyResponse(Base):
|
|
|
+ __tablename__ = 'emergency_responses'
|
|
|
+
|
|
|
+ id = Column(Integer, autoincrement=True, primary_key=True)
|
|
|
+ plan_id = Column(String(50), nullable=False,comment='预案id')
|
|
|
+ response_id = Column(String(50), nullable=False, comment='响应编号')
|
|
|
+ event_name = Column(String(255), nullable=False, comment='事件名称')
|
|
|
+ event_type = Column(String(100), nullable=False, comment='事件类型')
|
|
|
+ response_unit = Column(String(255), comment='响应单位')
|
|
|
+ event_address = Column(String(255), comment='事件地点')
|
|
|
+ response_level = Column(String(100), comment='响应级别')
|
|
|
+ response_start_time = Column(DateTime, comment='响应开始时间')
|
|
|
+ response_end_time = Column(DateTime, comment='响应结束时间')
|
|
|
+ create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
|
|
|
+ update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
|
|
|
+ create_dept = Column(BigInteger, default=None, comment='创建部门')
|
|
|
+ create_by = Column(BigInteger, default=None, comment='创建者')
|
|
|
+ del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
|