resource_provision_base.py 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. from sqlalchemy import ForeignKey,Column, String, Numeric, DateTime, Integer,Float,Boolean,BigInteger,Text
  2. # from sqlalchemy.orm import declarative_base
  3. from sqlalchemy.ext.declarative import declarative_base
  4. from datetime import datetime
  5. import uuid
  6. Base = declarative_base()
  7. class WaterResourceProject(Base):
  8. __tablename__ = 'water_resource_projects'
  9. id = Column(Integer, primary_key=True, autoincrement=True, comment='数据自增键')
  10. jsdwzjlx = Column(String(50), comment='建设单位证件类型')
  11. lxfs = Column(String(50), comment='联系方式')
  12. sjtgbmtyshxydm = Column(String(18), comment='数据提供部门统一社会信用代码')
  13. jdgljgbm = Column(String(50), comment='监督管理机关编码')
  14. cd_time = Column(DateTime, comment='插入时间')
  15. sjtgbmmc = Column(String(400), comment='数据提供部门名称')
  16. ggmj = Column(String(50), comment='灌溉面积')
  17. sjtgbmxzqhdm = Column(String(12), comment='数据提供部门行政区划代码')
  18. jsdwzjhm = Column(String(50), comment='建设单位证件号码')
  19. xzqhdm = Column(String(50), comment='水利设施和水利工程所在地行政区划代码')
  20. cd_operation = Column(String(10), comment='新增数据类型 I-INSERT, U_UPDATE, D-DELETE')
  21. zdmj = Column(String(50), comment='占地面积')
  22. d_bmmc = Column(String(500), comment='前置机归属数源部门名称源')
  23. etl_time = Column(DateTime, comment='ETL时间')
  24. jssj = Column(String(50), comment='建设时间')
  25. jsdwmc = Column(String(400), comment='建设单位名称')
  26. slsshslgcmc = Column(String(400), comment='水利设施和水利工程名称')
  27. cd_batch = Column(String(200), comment='数据批次号')
  28. slsshslgcdd = Column(String(400), comment='水利设施和水利工程地点')
  29. jdgljg = Column(String(400), comment='监督管理机关')
  30. jingdu = Column(String(50), comment='经度')
  31. weidu = Column(String(50), comment='维度')
  32. is_delete = Column(Integer, comment='删除标识')
  33. class Config:
  34. allow_population_by_field_name = True
  35. orm_mode = True
  36. def to_dict(self):
  37. return {
  38. "id": self.id,
  39. "jsdwzjlx": self.jsdwzjlx,
  40. "lxfs": self.lxfs,
  41. "sjtgbmtyshxydm": self.sjtgbmtyshxydm,
  42. "jdgljgbm": self.jdgljgbm,
  43. "cd_time": self.cd_time,
  44. "sjtgbmmc": self.sjtgbmmc,
  45. "ggmj": self.ggmj,
  46. "sjtgbmxzqhdm": self.sjtgbmxzqhdm,
  47. "jsdwzjhm": self.jsdwzjhm,
  48. "xzqhdm": self.xzqhdm,
  49. "cd_operation": self.cd_operation,
  50. "zdmj": self.zdmj,
  51. "d_bmmc": self.d_bmmc,
  52. "etl_time": self.etl_time,
  53. "jssj": self.jssj,
  54. "jsdwmc": self.jsdwmc,
  55. "slsshslgcmc": self.slsshslgcmc,
  56. "cd_batch": self.cd_batch,
  57. "slsshslgcdd": self.slsshslgcdd,
  58. "jdgljg": self.jdgljg,
  59. "jingdu": self.jingdu,
  60. "weidu": self.weidu,
  61. # "is_delete": self.is_delete
  62. }
  63. class Unit(Base):
  64. __tablename__ = 'rescue_units'
  65. id = Column(Integer, autoincrement=True, primary_key=True)
  66. name = Column(String(255), nullable=False, comment='单位名称')
  67. category = Column(String(100), nullable=False, comment='类别')
  68. address = Column(String(255), nullable=False, comment='地址')
  69. equipment = Column(String(255), comment='装备')
  70. training = Column(String(255), comment='训练')
  71. responsible_person = Column(String(100), comment='负责人')
  72. contact_number = Column(String(20), comment='联系电话')
  73. longitude = Column(Float, comment='经度')
  74. latitude = Column(Float, comment='纬度')
  75. is_delete = Column(Integer, comment='删除标识')
  76. position = Column(String(100), comment='负责人职务')
  77. team_size = Column(Integer, comment='队伍人数')
  78. supervisor_unit = Column(String(100), comment='主管单位')
  79. def to_dict(self):
  80. return {
  81. "id": self.id,
  82. "name": self.name,
  83. "category": self.category,
  84. "address": self.address,
  85. "equipment": self.equipment,
  86. "training": self.training,
  87. "responsible_person": self.responsible_person,
  88. "contact_number": self.contact_number,
  89. "longitude": self.longitude,
  90. "latitude": self.latitude,
  91. "position": self.position, # 新增字段:负责人职务
  92. "team_size": self.team_size, # 新增字段:队伍人数
  93. "supervisor_unit": self.supervisor_unit, # 新增字段:主管单位
  94. # "is_delete": self.is_delete
  95. }
  96. class Config:
  97. allow_population_by_field_name = True
  98. orm_mode = True
  99. class RescuePersonnel(Base):
  100. __tablename__ = 'rescue_personnel'
  101. id = Column(Integer, primary_key=True, autoincrement=True)
  102. name = Column(String(255), nullable=False, comment='姓名')
  103. contact_number = Column(String(20), nullable=False, comment='联系电话')
  104. gender = Column(String(10), nullable=False, comment='性别')
  105. current_address = Column(String(255), nullable=False, comment='现在地址')
  106. position = Column(String(100), comment='职务')
  107. unit_id = Column(Integer, comment='所属救援人员单位ID')
  108. unit_name = Column(Integer, comment='所属救援人员单位')
  109. is_delete = Column(Integer, default=0, comment='删除标识')
  110. modified_time = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, comment='修改时间')
  111. created_time = Column(DateTime, default=datetime.utcnow, comment='创建时间')
  112. def to_dict(self):
  113. return {
  114. "id": self.id,
  115. "name": self.name,
  116. "contact_number": self.contact_number,
  117. "gender": self.gender,
  118. "current_address": self.current_address,
  119. "position": self.position,
  120. "unit_id": self.unit_id,
  121. # "is_delete": self.is_delete,
  122. "unit_name": self.unit_name,
  123. "modified_time": self.modified_time.isoformat() if self.modified_time else None,
  124. "created_time": self.created_time.isoformat() if self.created_time else None
  125. }
  126. class RescueStation(Base):
  127. __tablename__ = 'rescue_stations'
  128. id = Column(Integer, primary_key=True, autoincrement=True, comment='数字自增ID')
  129. data_id = Column(String(255), primary_key=True, default=uuid.uuid4, comment='uuid主键')
  130. fwdx = Column(String(100), comment='服务对象姓名')
  131. zj = Column(String(20), comment='所属镇街')
  132. lng = Column(String(30), comment='救助站经度')
  133. cd_time = Column(DateTime, comment='更新时间')
  134. fwdmc = Column(String(50), comment='救助站名称')
  135. fwnr = Column(String(500), comment='服务内容')
  136. add_time = Column(DateTime, comment='新增时间')
  137. cd_operation = Column(String(1), comment='操作方式')
  138. fwdlx = Column(String(2), comment='救助站类型')
  139. lxdh = Column(String(30), comment='联系电话')
  140. kfsj = Column(String(100), comment='开放时间')
  141. lat = Column(String(30), comment='救助站纬度')
  142. fwdjj = Column(String(1000), comment='救助站简介')
  143. lxr = Column(String(30), comment='联系人')
  144. fid = Column(String(36), comment='主键')
  145. fwdzt = Column(String(1), comment='服务点状态')
  146. fwdaddr = Column(String(80), comment='服务点地址')
  147. ssqx = Column(String(80), comment='所属区县') #新增
  148. is_delete = Column(Boolean, default=False, comment='删除标识')
  149. def to_dict(self):
  150. return {
  151. "id": self.id,
  152. "data_id": self.data_id,
  153. "fwdx": self.fwdx,
  154. "zj": self.zj,
  155. "lng": self.lng,
  156. "cd_time": self.cd_time.isoformat() if self.cd_time else None,
  157. "fwdmc": self.fwdmc,
  158. "fwnr": self.fwnr,
  159. "add_time": self.add_time.isoformat() if self.add_time else None,
  160. "cd_operation": self.cd_operation,
  161. "fwdlx": self.fwdlx,
  162. "lxdh": self.lxdh,
  163. "kfsj": self.kfsj,
  164. "lat": self.lat,
  165. "fwdjj": self.fwdjj,
  166. "lxr": self.lxr,
  167. "fid": self.fid,
  168. "fwdzt": self.fwdzt,
  169. "fwdaddr": self.fwdaddr,
  170. "ssqx":self.ssqx
  171. # "is_delete": self.is_delete
  172. }
  173. class DefenseProject(Base):
  174. __tablename__ = 'defense_projects'
  175. data_id = Column(String(255), primary_key=True, default=uuid.uuid4, comment='uuid主键')
  176. id = Column(BigInteger, primary_key=True, autoincrement=True, comment='数字自增ID')
  177. gcmc = Column(String(200), comment='工程名称')
  178. jsdw = Column(String(100), comment='建设单位')
  179. whdw = Column(String(100), comment='维护单位')
  180. rfzyjlgcs = Column(String(100), comment='人防专业监理工程师')
  181. jsdd = Column(String(100), comment='建设地点')
  182. cd_operation = Column(String(1), comment='操作方式')
  183. yjdxsmj = Column(Numeric(12), comment='应建人防地下室面积(㎡)')
  184. sjdxsmj = Column(Numeric(12), comment='实建人防地下室面积(㎡)')
  185. cd_time = Column(DateTime, default=datetime.utcnow, comment='更新时间')
  186. add_time = Column(DateTime, default=datetime.utcnow, comment='新增时间')
  187. jldw = Column(String(100), comment='监理单位')
  188. jsdwdm = Column(String(100), comment='建设单位统一社会信用代码')
  189. kgsj = Column(DateTime, comment='开工时间')
  190. stdw = Column(String(100), comment='审图单位')
  191. cd_batch = Column(String(100), comment='批次号') #新增
  192. rfsjdwdm = Column(String(100), comment='人防设计单位单位统一社会信用代码')
  193. rfsjdw = Column(String(100), comment='人防设计单位单位')
  194. ybrs = Column(Numeric, comment='掩蔽人数')
  195. stdwdm = Column(String(100), comment='审图单位统一社会信用代码')
  196. whdwdm = Column(String(100), comment='维护单位统一社会信用代码')
  197. jldwdm = Column(String(100), comment='监理单位统一社会信用代码')
  198. rfzjlgcs = Column(String(100), comment='人防总监理工程师')
  199. gcid = Column(String(50), comment='主键')
  200. extend2 = Column(String(200), comment='扩展2')
  201. data_area = Column(String(12), comment='数据区域')
  202. extend1 = Column(String(200), comment='扩展1')
  203. jgsj = Column(DateTime, comment='竣工时间')
  204. rffhsbdw = Column(String(100), comment='人防防护设备单位')#新增
  205. rffhsbdwdm = Column(String(100), comment='人防防护设备单位统一社会信用代码')#新增
  206. jingdu = Column(Float, comment='经度')#新增
  207. weidu = Column(Float, comment='纬度')#新增
  208. is_delete = Column(Boolean, default=False, comment='删除标识')
  209. def to_dict(self):
  210. return {
  211. "id": self.id,
  212. "data_id": str(self.data_id), # 确保UUID转换为字符串
  213. "gcmc": self.gcmc,
  214. "jsdw": self.jsdw,
  215. "whdw": self.whdw,
  216. "rfzyjlgcs": self.rfzyjlgcs,
  217. "jsdd": self.jsdd,
  218. "cd_operation": self.cd_operation,
  219. "yjdxsmj": self.yjdxsmj,
  220. "sjdxsmj": self.sjdxsmj,
  221. "cd_time": self.cd_time.isoformat() if self.cd_time else None,
  222. "add_time": self.add_time.isoformat() if self.add_time else None,
  223. "jldw": self.jldw,
  224. "jsdwdm": self.jsdwdm,
  225. "kgsj": self.kgsj.isoformat() if self.kgsj else None,
  226. "stdw": self.stdw,
  227. "rfsjdwdm": self.rfsjdwdm,
  228. "rfsjdw": self.rfsjdw,
  229. "ybrs": self.ybrs,
  230. "stdwdm": self.stdwdm,
  231. "whdwdm": self.whdwdm,
  232. "jldwdm": self.jldwdm,
  233. "rfzjlgcs": self.rfzjlgcs,
  234. "gcid": self.gcid,
  235. "extend2": self.extend2,
  236. "data_area": self.data_area,
  237. "extend1": self.extend1,
  238. "jgsj": self.jgsj.isoformat() if self.jgsj else None,
  239. "cd_batch":self.cd_batch,
  240. "rffhsbdw":self.rffhsbdw,
  241. "rffhsbdwdm":self.rffhsbdwdm,
  242. "jingdu":self.jingdu,
  243. "weidu":self.weidu
  244. # "is_delete": self.is_delete,
  245. }
  246. class Shelter(Base):
  247. __tablename__ = 'shelters'
  248. data_id = Column(String(255), primary_key=True, default=uuid.uuid4, comment='uuid主键')
  249. id = Column(Integer, primary_key=True, autoincrement=True, comment='数字自增ID')
  250. admin_area = Column(String(100), comment='行政区域')
  251. full_name = Column(String(200), comment='应急避难场所全称')
  252. address = Column(String(255), comment='应急避难场所地址')
  253. incident_type = Column(String(100), comment='按突发事件类型分类')
  254. shelter_type = Column(String(100), comment='避难种类')
  255. total_area = Column(Numeric, comment='应急避难场所占地总面积(平方米)')
  256. indoor_area = Column(Numeric, comment='应急避难场所室内面积(平方米)')
  257. capacity = Column(Numeric, comment='避难场所容纳人数(人)')
  258. supplies = Column(String(500), comment='物资储备')
  259. facilities = Column(String(500), comment='应急设施')
  260. is_delete = Column(Boolean, default=False, comment='删除标识')
  261. modified_time = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow, comment='修改时间')
  262. created_time = Column(DateTime, default=datetime.utcnow, comment='创建时间')
  263. def to_dict(self):
  264. return {
  265. "id": self.id,
  266. "data_id": str(self.data_id),
  267. "admin_area": self.admin_area,
  268. "full_name": self.full_name,
  269. "address": self.address,
  270. "incident_type": self.incident_type,
  271. "shelter_type": self.shelter_type,
  272. "total_area": self.total_area,
  273. "indoor_area": self.indoor_area,
  274. "capacity": self.capacity,
  275. "supplies": self.supplies,
  276. "facilities": self.facilities,
  277. # "is_delete": self.is_delete,
  278. "modified_time": self.modified_time.isoformat() if self.modified_time else None,
  279. "created_time": self.created_time.isoformat() if self.created_time else None,
  280. }
  281. class ResourceProvisionMaterialType(Base):
  282. __tablename__ = 'resource_provision_material_types'
  283. id = Column(Integer, autoincrement=True, primary_key=True, comment='物资类型ID')
  284. parent_id = Column(Integer, ForeignKey('resource_provision_material_types.id', ondelete='SET NULL'), comment='父类ID')
  285. material_category_name = Column(String(255), nullable=False, comment='物资类别名称')
  286. material_category_level = Column(Integer, comment='物资类别等级')
  287. sort_order = Column(Integer, comment='排序')
  288. display_status = Column(String(1), default='1', comment='显示状态(1显示 0不显示)')
  289. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  290. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  291. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  292. create_dept = Column(BigInteger, default=None, comment='创建部门')
  293. create_by = Column(BigInteger, default=None, comment='创建者')
  294. update_by = Column(BigInteger, default=None, comment='更新者')
  295. def __repr__(self):
  296. return f"<MaterialType(name='{self.material_category_name}', level='{self.material_category_level}')>"
  297. class ResourceProvisionWarehouseInfo(Base):
  298. __tablename__ = 'resource_provision_warehouse_info'
  299. warehouse_id = Column(String(255), primary_key=True, autoincrement=True, comment='仓库id')
  300. warehouse_name = Column(String(255), nullable=True, comment='仓库名称')
  301. status = Column(String(50), nullable=True, comment='状态')
  302. contact_person = Column(String(100), nullable=True, comment='联系人')
  303. contact_phone = Column(String(20), nullable=True, comment='联系电话')
  304. address = Column(String(255), nullable=True, comment='地址')
  305. remark = Column(Text, nullable=True, comment='备注')
  306. type = Column(String(50), nullable=True, comment='类型')
  307. level = Column(String(50), nullable=True, comment='等级')
  308. storage_dept_id = Column(Integer, nullable=True, comment='物资保管部门id')
  309. storage_dept_name = Column(String(255), nullable=True, comment='物资保管部门名称')
  310. area_name = Column(String(100), nullable=True, comment='地区')
  311. longitude = Column(Numeric(9, 6), nullable=True, comment='经度')
  312. latitude = Column(Numeric(8, 6), nullable=True, comment='纬度')
  313. area = Column(Numeric(15, 2), nullable=True, comment='占地面积(平方米)')
  314. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  315. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  316. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  317. create_dept = Column(BigInteger, default=None, comment='创建部门')
  318. create_by = Column(BigInteger, default=None, comment='创建者')
  319. update_by = Column(BigInteger, default=None, comment='更新者')
  320. class ResourceProvisionWarehouseRoomInfo(Base):
  321. __tablename__ = 'resource_provision_warehouse_room_info'
  322. id = Column(String(255), primary_key=True, comment='ID')
  323. room_name = Column(String(255), nullable=True, comment='库房名称')
  324. warehouse = Column(String(255), nullable=True, comment='所在仓库')
  325. room_area = Column(Numeric(15, 2), nullable=True, comment='库房面积(平方米)')
  326. available_area = Column(Numeric(15, 2), nullable=True, comment='可用仓储面积(平方米)')
  327. height = Column(Numeric(10, 2), nullable=True, comment='高度(米)')
  328. room_volume = Column(Numeric(20, 2), nullable=True, comment='库房容积(立方米)')
  329. available_volume = Column(Numeric(20, 2), nullable=True, comment='可用库房容积(立方米)')
  330. level = Column(String(50), nullable=True, comment='等级')
  331. storage_type_code = Column(String(50), nullable=True, comment='存放类型')
  332. storage_type = Column(String(50), nullable=True, comment='保管类型')
  333. last_inventory_time = Column(DateTime, nullable=True, comment='库存确认最新时间')
  334. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  335. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  336. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  337. create_dept = Column(BigInteger, default=None, comment='创建部门')
  338. create_by = Column(BigInteger, default=None, comment='创建者')
  339. update_by = Column(BigInteger, default=None, comment='更新者')
  340. remark = Column(Text, nullable=True, comment='备注')
  341. class ResourceProvisionMaterialInfo(Base):
  342. __tablename__ = 'resource_provision_material_info'
  343. material_id = Column(Integer, primary_key=True, autoincrement=True, comment='物资编码')
  344. material_name = Column(String(255), nullable=True, comment='物资名称')
  345. warehouse_id = Column(Integer, nullable=True, comment='仓库id')
  346. inventory = Column(Integer, nullable=True, comment='库存')
  347. specification = Column(String(255), nullable=True, comment='规格')
  348. model = Column(String(255), nullable=True, comment='型号')
  349. category_name = Column(String(255), nullable=True, comment='分类名称')
  350. material_type = Column(String(255), nullable=True, comment='物资类型')
  351. unit_name = Column(String(255), nullable=True, comment='计量单位名称')
  352. brand_name = Column(String(255), nullable=True, comment='品牌名称')
  353. length = Column(Numeric(10, 2), nullable=True, comment='长(厘米)')
  354. width = Column(Numeric(10, 2), nullable=True, comment='宽(厘米)')
  355. height = Column(Numeric(10, 2), nullable=True, comment='高(厘米)')
  356. volume = Column(Numeric(20, 2), nullable=True, comment='体积(立方厘米)')
  357. gross_weight = Column(Numeric(10, 2), nullable=True, comment='毛重(kg)')
  358. net_weight = Column(Numeric(10, 2), nullable=True, comment='净重(kg)')
  359. manufacturer = Column(String(255), nullable=True, comment='生产厂商')
  360. origin = Column(String(255), nullable=True, comment='产地')
  361. status = Column(String(50), nullable=True, comment='状态')
  362. room_id = Column(Integer, nullable=True, comment='库房id')
  363. package_quantity = Column(Integer, nullable=True, comment='包装数量')
  364. package_volume = Column(Numeric(20, 2), nullable=True, comment='包装体积(立方厘米)')
  365. package_weight = Column(Numeric(10, 2), nullable=True, comment='包装重量(kg)')
  366. price = Column(Numeric(10, 2), nullable=True, comment='价格')
  367. selling_price = Column(Numeric(10, 2), nullable=True, comment='售卖价格')
  368. value = Column(Numeric(10, 2), nullable=True, comment='价值')
  369. cost_price = Column(Numeric(10, 2), nullable=True, comment='成本价格')
  370. disaster_types = Column(String(255), nullable=True, comment='适用灾种')
  371. maintenance = Column(Text, nullable=True, comment='使用保养')
  372. supplier_name = Column(String(255), nullable=True, comment='供应商名称')
  373. special_transportation_requirements = Column(Text, nullable=True, comment='特殊运输要求')
  374. material = Column(String(255), nullable=True, comment='材质')
  375. shelf_life = Column(DateTime, nullable=True, comment='保质期')
  376. inventory_warning_pusher = Column(String(255), nullable=True, comment='库存预警推送人')
  377. inventory_warning_quantity = Column(Integer, nullable=True, comment='库存预警数量')
  378. shelf_life_warning_days = Column(Integer, nullable=True, comment='保质期到期预警天数')
  379. shelf_life_warning_pusher = Column(String(255), nullable=True, comment='保质期预警推送人')
  380. from_sys= Column(String(255), nullable=True, comment='来源系统')
  381. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)')
  382. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  383. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  384. create_dept = Column(BigInteger, default=None, comment='创建部门')
  385. create_by = Column(BigInteger, default=None, comment='创建者')
  386. update_by = Column(BigInteger, default=None, comment='更新者')
  387. remark = Column(Text, nullable=True, comment='备注')
  388. class ResourceProvisionFile(Base):
  389. __tablename__ = 'resource_provision_file'
  390. id = Column(Integer, autoincrement=True, primary_key=True)
  391. file_id = Column(String(50), nullable=False, comment='文件id')
  392. file_name = Column(String(255), nullable=False, comment='文件名称')
  393. file_name_desc = Column(String(255), nullable=False, comment='文件名称原名')
  394. file_path = Column(String(255), comment='文件存储路径')
  395. file_size = Column(String(50), comment='文件大小')
  396. status = Column(String(50), comment='文件状态')
  397. foreign_key = Column(String(50), comment='文件外键 --技术字段')
  398. from_scenario = Column(String(50), comment='对应标识 --技术字段')
  399. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  400. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  401. create_dept = Column(BigInteger, default=None, comment='创建部门')
  402. create_by = Column(BigInteger, default=None, comment='创建者')
  403. del_flag = Column(String(1), default='0', comment='删除标志(0代表存在 2代表删除)') #更新预案信息的时候 先将原有的进行备注删除
  404. class Config:
  405. orm_mode = True