yzy_base.py 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. from sqlalchemy import String, Column, Integer, Date, DateTime
  4. from database import Base
  5. from datetime import datetime
  6. class YzyOrgUnitEntity(Base):
  7. """
  8. 组织机构信息表
  9. """
  10. __tablename__ = "yzy_org_unit"
  11. unitid = Column(String, primary_key=True)
  12. unitname = Column(String)
  13. createtime = Column(DateTime)
  14. updatetime = Column(DateTime)
  15. unitpath = Column(String)
  16. unitfullpath = Column(String)
  17. unitidfullpath = Column(String)
  18. parentunitid = Column(String)
  19. order = Column(Integer)
  20. weworkpartyid = Column(String)
  21. orgtype = Column(String)
  22. priority = Column(Integer)
  23. class Config:
  24. orm_mode = True
  25. class YzyOrgUserEntity(Base):
  26. """
  27. 用户信息表
  28. """
  29. __tablename__ = "yzy_org_user"
  30. uid = Column(Integer, primary_key=True, autoincrement=True)
  31. userid = Column(String, primary_key=True)
  32. username = Column(String)
  33. displayname = Column(String)
  34. account = Column(String)
  35. gender = Column(Integer)
  36. telephonenumber = Column(String)
  37. certificatetypeid = Column(Integer)
  38. certificatenumber = Column(String)
  39. #weworkpartyid = Column(String)
  40. createtime = Column(DateTime)
  41. updatetime = Column(DateTime)
  42. unitid = Column(String)
  43. #unitleader = Column(Integer)
  44. position = Column(String)
  45. priority = Column(Integer)
  46. unitpath = Column(Integer)
  47. class Config:
  48. orm_mode = True
  49. class YzyMsgQueue(Base):
  50. """
  51. 粤政易消息队列
  52. """
  53. __tablename__ = "yzy_msg_queue"
  54. id = Column(Integer, primary_key=True, autoincrement=True)
  55. yzy_userid = Column(String, default='', server_default='', comment='粤政易用户ID')
  56. mobile = Column(String, default='', server_default='', comment='手机号码')
  57. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  58. sent_time = Column(String, comment='发送时间')
  59. sent_status = Column(Integer, default=0, server_default='0', comment='发送状态 0 待发 1发送中 2 发送成功 9 发送失败')
  60. content = Column(String, default='', server_default='', comment='消息体')
  61. recorded_by = Column(Integer, default=0, server_default='0', comment='记录用户ID')
  62. detail_url = Column(String, default='', server_default='', comment='跳转URL')
  63. title = Column(String, default='', server_default='', comment='标题')
  64. foreign_key = Column(String, default='', server_default='', comment='文件外键 --技术字段')
  65. from_scenario = Column(String, default='', server_default='', comment='对应标识 --技术字段')
  66. errcode = Column(Integer, default=0, server_default='0', comment='错误代码')
  67. errmsg = Column(String, default='', server_default='', comment='错误提示')
  68. class YssYstUploadFileEntity(Base):
  69. """
  70. 上传文件
  71. """
  72. __tablename__ = "yssyst_upload_file"
  73. id = Column(Integer, primary_key=True, autoincrement=True, index=True)
  74. sfzh = Column(String, default='')
  75. uuid = Column(String, default='')
  76. file_name = Column(String, default='')
  77. save_filepath = Column(String, default='')
  78. file_type = Column(String, default='')
  79. created_time = Column(Integer, default=0)
  80. bzid = Column(String, default='')
  81. file_desc = Column(String, default='')
  82. class Config:
  83. orm_mode = True
  84. class YstYhpcsbEntity(Base):
  85. """
  86. 粤商通_隐患排查上报
  87. """
  88. __tablename__ = "yst_yhpcsb"
  89. id = Column(Integer, primary_key=True, autoincrement=True, index=True)
  90. bzid = Column(String, default='')
  91. sfzh = Column(String, default='')
  92. xm = Column(String, default='')
  93. qydm = Column(String, default='')
  94. qymc = Column(String, default='')
  95. qydz = Column(String, default='')
  96. qyjb = Column(String, default='')
  97. fzdc = Column(String, default='')
  98. fzr = Column(String, default='')
  99. fzrdh = Column(String, default='')
  100. gm = Column(String, default='')
  101. gzcs = Column(String, default='')
  102. qzjjss = Column(String, default='')
  103. swxrs = Column(String, default='')
  104. szdq = Column(String, default='')
  105. xxdz = Column(String, default='')
  106. yhdmc = Column(String, default='')
  107. yhdzt = Column(String, default='')
  108. ywfzya = Column(String, default='')
  109. zhlx = Column(String, default='')
  110. status = Column(Integer, default=0)
  111. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  112. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  113. class Config:
  114. orm_mode = True
  115. class YstQyjcxxEntity(Base):
  116. """
  117. 粤商通_应急企业基础信息
  118. """
  119. __tablename__ = "yst_qyjcxx"
  120. id = Column(Integer, primary_key=True, autoincrement=True, index=True)
  121. bzid = Column(String, default='')
  122. sfzh = Column(String, default='')
  123. xm = Column(String, default='')
  124. qydm = Column(String, default='')
  125. qymc = Column(String, default='')
  126. qydz = Column(String, default='')
  127. qyjb = Column(String, default='')
  128. szdq = Column(String, default='')
  129. xxdz = Column(String, default='')
  130. zrrxm = Column(String, default='')
  131. zrrdh = Column(String, default='')
  132. status = Column(Integer, default=0)
  133. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  134. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  135. class Config:
  136. orm_mode = True
  137. class YstQyyjyaEntity(Base):
  138. """
  139. 粤商通_企业应急预案信息
  140. """
  141. __tablename__ = "yst_qyyjya"
  142. id = Column(Integer, primary_key=True, autoincrement=True, index=True)
  143. bzid = Column(String, default='')
  144. sfzh = Column(String, default='')
  145. xm = Column(String, default='')
  146. qydm = Column(String, default='')
  147. qymc = Column(String, default='')
  148. qydz = Column(String, default='')
  149. qyjb = Column(String, default='')
  150. bzmd = Column(String, default='')
  151. bzyj = Column(String, default='')
  152. qygk = Column(String, default='')
  153. wxxfx = Column(String, default='')
  154. syfw = Column(String, default='')
  155. yjjyyz = Column(String, default='')
  156. yjczcs = Column(String, default='')
  157. yjxy = Column(String, default='')
  158. status = Column(Integer, default=0)
  159. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  160. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  161. class Config:
  162. orm_mode = True
  163. class YstYjylzjEntity(Base):
  164. """
  165. 粤商通_应急企业基础信息
  166. """
  167. __tablename__ = "yst_yjylzj"
  168. id = Column(Integer, primary_key=True, autoincrement=True, index=True)
  169. bzid = Column(String, default='')
  170. sfzh = Column(String, default='')
  171. xm = Column(String, default='')
  172. qydm = Column(String, default='')
  173. qymc = Column(String, default='')
  174. qydz = Column(String, default='')
  175. qyjb = Column(String, default='')
  176. xmmc = Column(String, default='')
  177. yllx = Column(String, default='')
  178. zzdw = Column(String, default='')
  179. status = Column(Integer, default=0)
  180. create_time = Column(DateTime, default=datetime.now, comment='数据创建时间')
  181. update_time = Column(DateTime, default=datetime.now, onupdate=datetime.now, comment='数据更新时间')
  182. class Config:
  183. orm_mode = True
  184. # 待办
  185. class VwYstDaiban(Base):
  186. __tablename__ = "vw_yst_daiban"
  187. bzid = Column(String, primary_key=True, index=True)
  188. sfzh = Column(String)
  189. sxmc = Column(String)
  190. xm = Column(String)
  191. create_time = Column(DateTime)
  192. update_time = Column(DateTime)
  193. status = Column(Integer)
  194. qymc = Column(String)
  195. qydm = Column(String)
  196. class Config:
  197. orm_mode = True
  198. #
  199. #
  200. # 进度表定义
  201. #
  202. #
  203. class YstProcessEntity(Base):
  204. """
  205. 事项进度
  206. """
  207. __tablename__ = "yst_process"
  208. id = Column(Integer, primary_key=True, autoincrement=True, index=True)
  209. # 报装ID
  210. bzid = Column(String, default='')
  211. # 报装类型
  212. bzlx = Column(String, default='')
  213. # 身份证号
  214. sfzh = Column(String, default='')
  215. # 申请来源
  216. sqly = Column(String, default='')
  217. # 状态
  218. zt = Column(Integer, default=0)
  219. # 状态说明
  220. ztsm = Column(String, default='')
  221. # 进度说明
  222. jdsm = Column(String, default='')
  223. # 登记时间
  224. djsj = Column(Integer, default=0)
  225. class Config:
  226. orm_mode = True