dm_avenuex.sql 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037
  1. CREATE TABLE "EMERGENCY"."dmmatype"
  2. (
  3. "id" INT IDENTITY(1, 1) NOT NULL,
  4. "matype1" VARCHAR(100),
  5. "matype2" VARCHAR(100),
  6. "maname" VARCHAR(100),
  7. "maspec" VARCHAR(100),
  8. "maunit" VARCHAR(50),
  9. NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  10. COMMENT ON TABLE "EMERGENCY"."dmmatype" IS '代码表,物资类别';
  11. COMMENT ON COLUMN "EMERGENCY"."dmmatype"."maname" IS '名字';
  12. COMMENT ON COLUMN "EMERGENCY"."dmmatype"."maspec" IS '规格';
  13. COMMENT ON COLUMN "EMERGENCY"."dmmatype"."matype1" IS '大类';
  14. COMMENT ON COLUMN "EMERGENCY"."dmmatype"."matype2" IS '类别';
  15. COMMENT ON COLUMN "EMERGENCY"."dmmatype"."maunit" IS '计量单位';
  16. CREATE TABLE "EMERGENCY"."inbound_info"
  17. (
  18. "inbound_id" INT IDENTITY(1, 1) NOT NULL,
  19. "inbound_type" VARCHAR(128),
  20. "material_group" VARCHAR(128),
  21. "material_type" VARCHAR(128),
  22. "material_name" VARCHAR(256),
  23. "quantity" VARCHAR(25) DEFAULT 0,
  24. "inbound_time" VARCHAR(50),
  25. "is_available" VARCHAR(50),
  26. "status" VARCHAR(50),
  27. "submit_time" DATETIME(6),
  28. "user_id" VARCHAR(128),
  29. "warehouse" VARCHAR(256),
  30. "dept_id" VARCHAR(256),
  31. NOT CLUSTER PRIMARY KEY("inbound_id")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  32. COMMENT ON TABLE "EMERGENCY"."inbound_info" IS '入库信息表';
  33. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."dept_id" IS '创建人部门ID';
  34. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."inbound_id" IS '入库信息id';
  35. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."inbound_time" IS '入库日期';
  36. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."inbound_type" IS '入库类型';
  37. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."is_available" IS '是否可用';
  38. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."material_group" IS '物资大类';
  39. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."material_name" IS '物资名称';
  40. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."material_type" IS '物资类别';
  41. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."quantity" IS '数量';
  42. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."status" IS '状态';
  43. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."submit_time" IS '提交时间';
  44. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."user_id" IS '用户id';
  45. COMMENT ON COLUMN "EMERGENCY"."inbound_info"."warehouse" IS '库点简称';
  46. CREATE TABLE "EMERGENCY"."inbound_material_info"
  47. (
  48. "material_id" INT IDENTITY(1, 1) NOT NULL,
  49. "inbound_id" INT,
  50. "inbound_type" VARCHAR(255),
  51. "material_group" VARCHAR(255),
  52. "material_type" VARCHAR(255),
  53. "material_name" VARCHAR(255),
  54. "unit" VARCHAR(255),
  55. "quantity" VARCHAR(255) DEFAULT 0,
  56. "specs" VARCHAR(128),
  57. "inbound_time" VARCHAR(128),
  58. "unit_price" VARCHAR(255),
  59. "total_price" VARCHAR(255),
  60. "is_available" VARCHAR(50),
  61. "file_part" VARCHAR(128),
  62. "remarks" VARCHAR(3072),
  63. "material_tree" VARCHAR(128),
  64. "file_name" VARCHAR(128),
  65. NOT CLUSTER PRIMARY KEY("material_id")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  66. COMMENT ON TABLE "EMERGENCY"."inbound_material_info" IS '入库信息-物资信息表';
  67. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."file_name" IS '文件名称';
  68. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."file_part" IS '文件上传';
  69. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."inbound_id" IS '入库信息表id';
  70. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."inbound_time" IS '入库日期';
  71. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."inbound_type" IS '入库类型';
  72. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."is_available" IS '是否可用';
  73. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."material_group" IS '物资大类';
  74. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."material_id" IS '入库物资id';
  75. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."material_name" IS '物资名称';
  76. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."material_tree" IS '物资树';
  77. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."material_type" IS '物资类别';
  78. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."quantity" IS '数量';
  79. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."remarks" IS '备注';
  80. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."specs" IS '规格';
  81. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."total_price" IS '总价';
  82. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."unit" IS '单位';
  83. COMMENT ON COLUMN "EMERGENCY"."inbound_material_info"."unit_price" IS '单价';
  84. CREATE TABLE "EMERGENCY"."inbound_status"
  85. (
  86. "id" INT IDENTITY(1, 1) NOT NULL,
  87. "status" VARCHAR(50),
  88. "is_invalid" VARCHAR(50) DEFAULT 0,
  89. "file_part" VARCHAR(128),
  90. "auditing_time" DATETIME(6),
  91. "dept_id" VARCHAR(50),
  92. "user_id" VARCHAR(50),
  93. "opinion" VARCHAR(500),
  94. "file_name" VARCHAR(129),
  95. "inbound_id" INT,
  96. NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  97. COMMENT ON TABLE "EMERGENCY"."inbound_status" IS '入库审核状态表';
  98. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."auditing_time" IS '审核时间';
  99. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."dept_id" IS '审核部门';
  100. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."file_name" IS '文件名称';
  101. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."file_part" IS '文件id';
  102. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."id" IS '主键';
  103. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."inbound_id" IS '入库信息id';
  104. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."is_invalid" IS '是否失效';
  105. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."opinion" IS '意见';
  106. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."status" IS '状态';
  107. COMMENT ON COLUMN "EMERGENCY"."inbound_status"."user_id" IS '审核用户';
  108. CREATE TABLE "EMERGENCY"."marepo"
  109. (
  110. "id" BIGINT IDENTITY(1, 1) NOT NULL,
  111. "reponame" VARCHAR(200) NOT NULL,
  112. "maname" VARCHAR(200) NOT NULL,
  113. "matype1" VARCHAR(50),
  114. "matype2" VARCHAR(50),
  115. "matype1code" VARCHAR(50),
  116. "matype2code" VARCHAR(50),
  117. "maunit" VARCHAR(50),
  118. "maspec" VARCHAR(200),
  119. "manumber" NUMERIC,
  120. "mavalue" NUMERIC,
  121. "gmt_create" DATETIME(6),
  122. "gmt_modify" DATETIME(6),
  123. "isok" VARCHAR(50),
  124. "doc" VARCHAR(200),
  125. "maunitvalue" NUMERIC,
  126. NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  127. COMMENT ON TABLE "EMERGENCY"."marepo" IS '物资库存表。ma代表物资,repo代表库';
  128. COMMENT ON COLUMN "EMERGENCY"."marepo"."doc" IS '备注';
  129. COMMENT ON COLUMN "EMERGENCY"."marepo"."gmt_create" IS '记录创建时间';
  130. COMMENT ON COLUMN "EMERGENCY"."marepo"."gmt_modify" IS '记录更新时间';
  131. COMMENT ON COLUMN "EMERGENCY"."marepo"."isok" IS '是否可用。Y=可用,N=不可用';
  132. COMMENT ON COLUMN "EMERGENCY"."marepo"."maname" IS '物资名称';
  133. COMMENT ON COLUMN "EMERGENCY"."marepo"."manumber" IS '物资数量';
  134. COMMENT ON COLUMN "EMERGENCY"."marepo"."maspec" IS '物资规格';
  135. COMMENT ON COLUMN "EMERGENCY"."marepo"."matype1" IS '物资大类';
  136. COMMENT ON COLUMN "EMERGENCY"."marepo"."matype1code" IS '物资大类编码';
  137. COMMENT ON COLUMN "EMERGENCY"."marepo"."matype2" IS '物资类别';
  138. COMMENT ON COLUMN "EMERGENCY"."marepo"."matype2code" IS '物资类别编码';
  139. COMMENT ON COLUMN "EMERGENCY"."marepo"."maunit" IS '物资计量单位';
  140. COMMENT ON COLUMN "EMERGENCY"."marepo"."maunitvalue" IS '物资单价';
  141. COMMENT ON COLUMN "EMERGENCY"."marepo"."mavalue" IS '物资价值';
  142. COMMENT ON COLUMN "EMERGENCY"."marepo"."reponame" IS '库名称';
  143. CREATE TABLE "EMERGENCY"."outbound_info"
  144. (
  145. "outbound_id" INT IDENTITY(1, 1) NOT NULL,
  146. "outbound_type" VARCHAR(128),
  147. "material_group" VARCHAR(128),
  148. "material_type" VARCHAR(128),
  149. "material_name" VARCHAR(256),
  150. "quantity" VARCHAR(10),
  151. "called_province" VARCHAR(128),
  152. "outbound_time" VARCHAR(50),
  153. "is_available" VARCHAR(50),
  154. "status" VARCHAR(50),
  155. "submit_time" DATETIME(6),
  156. "user_id" VARCHAR(128),
  157. "warehouse" VARCHAR(256),
  158. "dept_id" VARCHAR(256),
  159. NOT CLUSTER PRIMARY KEY("outbound_id")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  160. COMMENT ON TABLE "EMERGENCY"."outbound_info" IS '出库信息表';
  161. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."called_province" IS '调用省份';
  162. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."dept_id" IS '创建人部门ID';
  163. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."is_available" IS '是否可用';
  164. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."material_group" IS '物资大类';
  165. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."material_name" IS '物资名称';
  166. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."material_type" IS '物资类别';
  167. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."outbound_id" IS '出库信息id';
  168. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."outbound_time" IS '出库日期';
  169. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."outbound_type" IS '出库类型';
  170. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."quantity" IS '数量';
  171. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."status" IS '状态';
  172. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."submit_time" IS '提交时间';
  173. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."user_id" IS '用户id';
  174. COMMENT ON COLUMN "EMERGENCY"."outbound_info"."warehouse" IS '库点简称';
  175. CREATE TABLE "EMERGENCY"."outbound_material_info"
  176. (
  177. "material_id" INT IDENTITY(1, 1) NOT NULL,
  178. "outbound_id" INT,
  179. "outbound_type" VARCHAR(128),
  180. "material_group" VARCHAR(128),
  181. "material_type" VARCHAR(128),
  182. "material_name" VARCHAR(128),
  183. "unit" VARCHAR(50),
  184. "quantity" VARCHAR(50),
  185. "province" VARCHAR(128),
  186. "specs" VARCHAR(128),
  187. "outbound_time" VARCHAR(50),
  188. "unit_price" VARCHAR(50),
  189. "total_price" VARCHAR(50),
  190. "is_available" VARCHAR(50),
  191. "file_part" VARCHAR(128),
  192. "remarks" VARCHAR(500),
  193. "material_tree" VARCHAR(128),
  194. "file_name" VARCHAR(128),
  195. NOT CLUSTER PRIMARY KEY("material_id")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  196. COMMENT ON TABLE "EMERGENCY"."outbound_material_info" IS '出库信息-物资信息表';
  197. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."file_name" IS '文件名称';
  198. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."file_part" IS '文件上传';
  199. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."is_available" IS '是否可用';
  200. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."material_group" IS '物资大类';
  201. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."material_id" IS '出库物资id';
  202. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."material_name" IS '物资名称';
  203. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."material_tree" IS '物资树';
  204. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."material_type" IS '物资类别';
  205. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."outbound_id" IS '出库信息表id';
  206. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."outbound_time" IS '出库日期';
  207. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."outbound_type" IS '出库类型';
  208. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."province" IS '调用省份';
  209. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."quantity" IS '数量';
  210. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."remarks" IS '备注';
  211. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."specs" IS '规格';
  212. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."total_price" IS '总价';
  213. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."unit" IS '单位';
  214. COMMENT ON COLUMN "EMERGENCY"."outbound_material_info"."unit_price" IS '单价';
  215. CREATE TABLE "EMERGENCY"."outbound_status"
  216. (
  217. "id" INT IDENTITY(1, 1) NOT NULL,
  218. "status" VARCHAR(50),
  219. "is_invalid" VARCHAR(50) DEFAULT 0,
  220. "file_part" VARCHAR(128),
  221. "auditing_time" DATETIME(6),
  222. "dept_id" VARCHAR(50),
  223. "user_id" VARCHAR(50),
  224. "opinion" VARCHAR(500),
  225. "file_name" VARCHAR(128),
  226. "outbound_id" INT,
  227. NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  228. COMMENT ON TABLE "EMERGENCY"."outbound_status" IS '审核状态表';
  229. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."auditing_time" IS '审核时间';
  230. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."dept_id" IS '审核部门';
  231. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."file_name" IS '文件名称';
  232. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."file_part" IS '文件id';
  233. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."id" IS '主键';
  234. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."is_invalid" IS '是否失效';
  235. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."opinion" IS '意见';
  236. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."outbound_id" IS '出库id';
  237. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."status" IS '状态';
  238. COMMENT ON COLUMN "EMERGENCY"."outbound_status"."user_id" IS '审核用户';
  239. CREATE TABLE "EMERGENCY"."outrepo"
  240. (
  241. "id" BIGINT IDENTITY(1, 1) NOT NULL,
  242. "reponame" VARCHAR(200) NOT NULL,
  243. "maname" VARCHAR(200) NOT NULL,
  244. "matype1" VARCHAR(50),
  245. "matype2" VARCHAR(50),
  246. "matype1code" VARCHAR(50),
  247. "matype2code" VARCHAR(50),
  248. "maunit" VARCHAR(50),
  249. "maspec" VARCHAR(50),
  250. "manumber" NUMERIC,
  251. "mavalue" NUMERIC,
  252. "maunitvalue" NUMERIC,
  253. "outrepodate" DATETIME(6),
  254. "outrepobatch" VARCHAR(50),
  255. "doc" VARCHAR(50),
  256. NOT CLUSTER PRIMARY KEY("id")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  257. COMMENT ON TABLE "EMERGENCY"."outrepo" IS '出库表。ma代表物资,repo代表库';
  258. COMMENT ON COLUMN "EMERGENCY"."outrepo"."doc" IS '备注';
  259. COMMENT ON COLUMN "EMERGENCY"."outrepo"."maname" IS '物资名称';
  260. COMMENT ON COLUMN "EMERGENCY"."outrepo"."manumber" IS '调拨物资数量';
  261. COMMENT ON COLUMN "EMERGENCY"."outrepo"."maspec" IS '物资规格';
  262. COMMENT ON COLUMN "EMERGENCY"."outrepo"."matype1" IS '物资大类';
  263. COMMENT ON COLUMN "EMERGENCY"."outrepo"."matype1code" IS '物资大类编码';
  264. COMMENT ON COLUMN "EMERGENCY"."outrepo"."matype2" IS '物资类别';
  265. COMMENT ON COLUMN "EMERGENCY"."outrepo"."matype2code" IS '物资类别编码';
  266. COMMENT ON COLUMN "EMERGENCY"."outrepo"."maunit" IS '物资计量单位';
  267. COMMENT ON COLUMN "EMERGENCY"."outrepo"."maunitvalue" IS '物资单价';
  268. COMMENT ON COLUMN "EMERGENCY"."outrepo"."mavalue" IS '物资价值';
  269. COMMENT ON COLUMN "EMERGENCY"."outrepo"."outrepobatch" IS '出库批次编码';
  270. COMMENT ON COLUMN "EMERGENCY"."outrepo"."outrepodate" IS '出库日期';
  271. COMMENT ON COLUMN "EMERGENCY"."outrepo"."reponame" IS '库名称';
  272. CREATE TABLE "EMERGENCY"."QRTZ_BLOB_TRIGGERS"
  273. (
  274. "SCHED_NAME" VARCHAR(120) NOT NULL,
  275. "TRIGGER_NAME" VARCHAR(200) NOT NULL,
  276. "TRIGGER_GROUP" VARCHAR(200) NOT NULL,
  277. "BLOB_DATA" BLOB,
  278. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"),
  279. CONSTRAINT "QRTZ_BLOB_TRIGGERS_IBFK_1" FOREIGN KEY("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "EMERGENCY"."QRTZ_TRIGGERS"("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  280. CREATE TABLE "EMERGENCY"."QRTZ_CALENDARS"
  281. (
  282. "SCHED_NAME" VARCHAR(120) NOT NULL,
  283. "CALENDAR_NAME" VARCHAR(200) NOT NULL,
  284. "CALENDAR" BLOB NOT NULL,
  285. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "CALENDAR_NAME")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  286. CREATE TABLE "EMERGENCY"."QRTZ_CRON_TRIGGERS"
  287. (
  288. "SCHED_NAME" VARCHAR(120) NOT NULL,
  289. "TRIGGER_NAME" VARCHAR(200) NOT NULL,
  290. "TRIGGER_GROUP" VARCHAR(200) NOT NULL,
  291. "CRON_EXPRESSION" VARCHAR(200) NOT NULL,
  292. "TIME_ZONE_ID" VARCHAR(80),
  293. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"),
  294. CONSTRAINT "QRTZ_CRON_TRIGGERS_IBFK_1" FOREIGN KEY("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "EMERGENCY"."QRTZ_TRIGGERS"("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  295. CREATE TABLE "EMERGENCY"."QRTZ_FIRED_TRIGGERS"
  296. (
  297. "SCHED_NAME" VARCHAR(120) NOT NULL,
  298. "ENTRY_ID" VARCHAR(95) NOT NULL,
  299. "TRIGGER_NAME" VARCHAR(200) NOT NULL,
  300. "TRIGGER_GROUP" VARCHAR(200) NOT NULL,
  301. "INSTANCE_NAME" VARCHAR(200) NOT NULL,
  302. "FIRED_TIME" BIGINT NOT NULL,
  303. "SCHED_TIME" BIGINT NOT NULL,
  304. "PRIORITY" INT NOT NULL,
  305. "STATE" VARCHAR(16) NOT NULL,
  306. "JOB_NAME" VARCHAR(200),
  307. "JOB_GROUP" VARCHAR(200),
  308. "IS_NONCONCURRENT" VARCHAR(1),
  309. "REQUESTS_RECOVERY" VARCHAR(1),
  310. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "ENTRY_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  311. CREATE TABLE "EMERGENCY"."QRTZ_JOB_DETAILS"
  312. (
  313. "SCHED_NAME" VARCHAR(120) NOT NULL,
  314. "JOB_NAME" VARCHAR(200) NOT NULL,
  315. "JOB_GROUP" VARCHAR(200) NOT NULL,
  316. "DESCRIPTION" VARCHAR(250),
  317. "JOB_CLASS_NAME" VARCHAR(250) NOT NULL,
  318. "IS_DURABLE" VARCHAR(1) NOT NULL,
  319. "IS_NONCONCURRENT" VARCHAR(1) NOT NULL,
  320. "IS_UPDATE_DATA" VARCHAR(1) NOT NULL,
  321. "REQUESTS_RECOVERY" VARCHAR(1) NOT NULL,
  322. "JOB_DATA" BLOB,
  323. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "JOB_NAME", "JOB_GROUP")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  324. CREATE TABLE "EMERGENCY"."QRTZ_LOCKS"
  325. (
  326. "SCHED_NAME" VARCHAR(120) NOT NULL,
  327. "LOCK_NAME" VARCHAR(40) NOT NULL,
  328. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "LOCK_NAME")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  329. CREATE TABLE "EMERGENCY"."QRTZ_PAUSED_TRIGGER_GRPS"
  330. (
  331. "SCHED_NAME" VARCHAR(120) NOT NULL,
  332. "TRIGGER_GROUP" VARCHAR(200) NOT NULL,
  333. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "TRIGGER_GROUP")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  334. CREATE TABLE "EMERGENCY"."QRTZ_SCHEDULER_STATE"
  335. (
  336. "SCHED_NAME" VARCHAR(120) NOT NULL,
  337. "INSTANCE_NAME" VARCHAR(200) NOT NULL,
  338. "LAST_CHECKIN_TIME" BIGINT NOT NULL,
  339. "CHECKIN_INTERVAL" BIGINT NOT NULL,
  340. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "INSTANCE_NAME")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  341. CREATE TABLE "EMERGENCY"."QRTZ_SIMPLE_TRIGGERS"
  342. (
  343. "SCHED_NAME" VARCHAR(120) NOT NULL,
  344. "TRIGGER_NAME" VARCHAR(200) NOT NULL,
  345. "TRIGGER_GROUP" VARCHAR(200) NOT NULL,
  346. "REPEAT_COUNT" BIGINT NOT NULL,
  347. "REPEAT_INTERVAL" BIGINT NOT NULL,
  348. "TIMES_TRIGGERED" BIGINT NOT NULL,
  349. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"),
  350. CONSTRAINT "QRTZ_SIMPLE_TRIGGERS_IBFK_1" FOREIGN KEY("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "EMERGENCY"."QRTZ_TRIGGERS"("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  351. CREATE TABLE "EMERGENCY"."QRTZ_SIMPROP_TRIGGERS"
  352. (
  353. "SCHED_NAME" VARCHAR(120) NOT NULL,
  354. "TRIGGER_NAME" VARCHAR(200) NOT NULL,
  355. "TRIGGER_GROUP" VARCHAR(200) NOT NULL,
  356. "STR_PROP_1" VARCHAR(512),
  357. "STR_PROP_2" VARCHAR(512),
  358. "STR_PROP_3" VARCHAR(512),
  359. "INT_PROP_1" INT,
  360. "INT_PROP_2" INT,
  361. "LONG_PROP_1" BIGINT,
  362. "LONG_PROP_2" BIGINT,
  363. "DEC_PROP_1" DEC(13,4),
  364. "DEC_PROP_2" DEC(13,4),
  365. "BOOL_PROP_1" VARCHAR(1),
  366. "BOOL_PROP_2" VARCHAR(1),
  367. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"),
  368. CONSTRAINT "QRTZ_SIMPROP_TRIGGERS_IBFK_1" FOREIGN KEY("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP") REFERENCES "EMERGENCY"."QRTZ_TRIGGERS"("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  369. CREATE TABLE "EMERGENCY"."QRTZ_TRIGGERS"
  370. (
  371. "SCHED_NAME" VARCHAR(120) NOT NULL,
  372. "TRIGGER_NAME" VARCHAR(200) NOT NULL,
  373. "TRIGGER_GROUP" VARCHAR(200) NOT NULL,
  374. "JOB_NAME" VARCHAR(200) NOT NULL,
  375. "JOB_GROUP" VARCHAR(200) NOT NULL,
  376. "DESCRIPTION" VARCHAR(250),
  377. "NEXT_FIRE_TIME" BIGINT,
  378. "PREV_FIRE_TIME" BIGINT,
  379. "PRIORITY" INT,
  380. "TRIGGER_STATE" VARCHAR(16) NOT NULL,
  381. "TRIGGER_TYPE" VARCHAR(8) NOT NULL,
  382. "START_TIME" BIGINT NOT NULL,
  383. "END_TIME" BIGINT,
  384. "CALENDAR_NAME" VARCHAR(200),
  385. "MISFIRE_INSTR" SMALLINT,
  386. "JOB_DATA" BLOB,
  387. NOT CLUSTER PRIMARY KEY("SCHED_NAME", "TRIGGER_NAME", "TRIGGER_GROUP"),
  388. CONSTRAINT "QRTZ_TRIGGERS_IBFK_1" FOREIGN KEY("SCHED_NAME", "JOB_NAME", "JOB_GROUP") REFERENCES "EMERGENCY"."QRTZ_JOB_DETAILS"("SCHED_NAME", "JOB_NAME", "JOB_GROUP")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  389. CREATE OR REPLACE INDEX "SCHED_NAME" ON "EMERGENCY"."QRTZ_TRIGGERS"("SCHED_NAME" ASC,"JOB_NAME" ASC,"JOB_GROUP" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  390. CREATE TABLE "EMERGENCY"."SYS_DEPT"
  391. (
  392. "DEPT_ID" VARCHAR(50) NOT NULL,
  393. "NAME" VARCHAR(120),
  394. "SORT_ORDER" INT DEFAULT 0 NOT NULL,
  395. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  396. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  397. "CREATE_TIME" TIMESTAMP(0),
  398. "UPDATE_TIME" TIMESTAMP(0),
  399. "DEL_FLAG" CHAR(1) DEFAULT '0',
  400. "PARENT_ID" VARCHAR(50),
  401. "TENANT_ID" BIGINT,
  402. "DEPT_TYPE" VARCHAR(50),
  403. "LONGITUDE" VARCHAR(50),
  404. "DIMENSION" VARCHAR(50),
  405. "WAREHOUSE_TYPE" VARCHAR(200),
  406. "ABBREVIATION_NAME" VARCHAR(100),
  407. "LEGAL_PERSON" VARCHAR(200),
  408. "DEPT_PHONE" VARCHAR(50),
  409. "RESERVOIR_IMG" VARCHAR(500),
  410. "DEPT_PROVINCE" VARCHAR(255),
  411. "DEPT_CITY" VARCHAR(255),
  412. "DEPT_AREA" VARCHAR(255),
  413. "DEPT_ADDRESS" VARCHAR(255),
  414. "DEPT_MERGE_ADDRESS" VARCHAR(500),
  415. NOT CLUSTER PRIMARY KEY("DEPT_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  416. COMMENT ON TABLE "EMERGENCY"."SYS_DEPT" IS '部门管理';
  417. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."ABBREVIATION_NAME" IS '部门名称缩写';
  418. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."CREATE_BY" IS '创建人';
  419. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."CREATE_TIME" IS '创建时间';
  420. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."DEPT_TYPE" IS '字段 dept_type 类型 1级国家局 2级 垂管局 3级仓库';
  421. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."DIMENSION" IS '维度';
  422. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."LONGITUDE" IS '经度';
  423. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."SORT_ORDER" IS '排序';
  424. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."UPDATE_BY" IS '修改人';
  425. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."UPDATE_TIME" IS '修改时间';
  426. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT"."WAREHOUSE_TYPE" IS '仓库类型 参考字典项 warehouse_type';
  427. CREATE TABLE "EMERGENCY"."SYS_DEPT_RELATION"
  428. (
  429. "ANCESTOR" VARCHAR(50) NOT NULL,
  430. "DESCENDANT" VARCHAR(50) NOT NULL,
  431. NOT CLUSTER PRIMARY KEY("ANCESTOR", "DESCENDANT")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  432. COMMENT ON TABLE "EMERGENCY"."SYS_DEPT_RELATION" IS '部门关系表';
  433. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT_RELATION"."ANCESTOR" IS '祖先节点';
  434. COMMENT ON COLUMN "EMERGENCY"."SYS_DEPT_RELATION"."DESCENDANT" IS '后代节点';
  435. CREATE OR REPLACE INDEX "IDX1" ON "EMERGENCY"."SYS_DEPT_RELATION"("ANCESTOR" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  436. CREATE OR REPLACE INDEX "IDX2" ON "EMERGENCY"."SYS_DEPT_RELATION"("DESCENDANT" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  437. CREATE TABLE "EMERGENCY"."SYS_DICT"
  438. (
  439. "ID" BIGINT NOT NULL,
  440. "DICT_TYPE" VARCHAR(100),
  441. "DESCRIPTION" VARCHAR(100),
  442. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  443. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  444. "CREATE_TIME" TIMESTAMP(0),
  445. "UPDATE_TIME" TIMESTAMP(0),
  446. "REMARKS" VARCHAR(255),
  447. "SYSTEM_FLAG" CHAR(1) DEFAULT '0',
  448. "DEL_FLAG" CHAR(1) DEFAULT '0',
  449. "TENANT_ID" BIGINT DEFAULT 0 NOT NULL,
  450. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  451. COMMENT ON TABLE "EMERGENCY"."SYS_DICT" IS '字典表';
  452. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT"."CREATE_BY" IS '创建人';
  453. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT"."CREATE_TIME" IS '创建时间';
  454. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT"."ID" IS '编号';
  455. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT"."TENANT_ID" IS '所属租户';
  456. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT"."UPDATE_BY" IS '修改人';
  457. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT"."UPDATE_TIME" IS '更新时间';
  458. CREATE OR REPLACE INDEX "SYS_DICT_DEL_FLAG" ON "EMERGENCY"."SYS_DICT"("DEL_FLAG" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  459. CREATE TABLE "EMERGENCY"."SYS_DICT_ITEM"
  460. (
  461. "ID" BIGINT NOT NULL,
  462. "DICT_ID" BIGINT NOT NULL,
  463. "ITEM_VALUE" VARCHAR(100),
  464. "LABEL" VARCHAR(100),
  465. "DICT_TYPE" VARCHAR(100),
  466. "DESCRIPTION" VARCHAR(100),
  467. "SORT_ORDER" INT DEFAULT 0 NOT NULL,
  468. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  469. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  470. "CREATE_TIME" TIMESTAMP(0),
  471. "UPDATE_TIME" TIMESTAMP(0),
  472. "REMARKS" VARCHAR(255),
  473. "DEL_FLAG" CHAR(1) DEFAULT '0',
  474. "TENANT_ID" BIGINT DEFAULT 0 NOT NULL,
  475. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  476. COMMENT ON TABLE "EMERGENCY"."SYS_DICT_ITEM" IS '字典项';
  477. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT_ITEM"."CREATE_BY" IS '创建人';
  478. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT_ITEM"."CREATE_TIME" IS '创建时间';
  479. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT_ITEM"."ID" IS '编号';
  480. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT_ITEM"."SORT_ORDER" IS '排序(升序)';
  481. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT_ITEM"."TENANT_ID" IS '所属租户';
  482. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT_ITEM"."UPDATE_BY" IS '修改人';
  483. COMMENT ON COLUMN "EMERGENCY"."SYS_DICT_ITEM"."UPDATE_TIME" IS '更新时间';
  484. CREATE OR REPLACE INDEX "SYS_DICT_ITEM_DEL_FLAG" ON "EMERGENCY"."SYS_DICT_ITEM"("DEL_FLAG" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  485. CREATE OR REPLACE INDEX "SYS_DICT_VALUE" ON "EMERGENCY"."SYS_DICT_ITEM"("ITEM_VALUE" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  486. CREATE OR REPLACE INDEX "SYS_DICT_LABEL" ON "EMERGENCY"."SYS_DICT_ITEM"("LABEL" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  487. CREATE TABLE "EMERGENCY"."SYS_FILE"
  488. (
  489. "ID" BIGINT NOT NULL,
  490. "FILE_NAME" VARCHAR(100),
  491. "BUCKET_NAME" VARCHAR(200),
  492. "ORIGINAL" VARCHAR(100),
  493. "TYPE" VARCHAR(50),
  494. "FILE_SIZE" BIGINT,
  495. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  496. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  497. "CREATE_TIME" TIMESTAMP(0),
  498. "UPDATE_TIME" TIMESTAMP(0),
  499. "DEL_FLAG" CHAR(1) DEFAULT '0',
  500. "TENANT_ID" BIGINT,
  501. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  502. COMMENT ON TABLE "EMERGENCY"."SYS_FILE" IS '文件管理表';
  503. COMMENT ON COLUMN "EMERGENCY"."SYS_FILE"."CREATE_BY" IS '创建人';
  504. COMMENT ON COLUMN "EMERGENCY"."SYS_FILE"."CREATE_TIME" IS '上传时间';
  505. COMMENT ON COLUMN "EMERGENCY"."SYS_FILE"."FILE_SIZE" IS '文件大小';
  506. COMMENT ON COLUMN "EMERGENCY"."SYS_FILE"."ID" IS '编号';
  507. COMMENT ON COLUMN "EMERGENCY"."SYS_FILE"."TENANT_ID" IS '所属租户';
  508. COMMENT ON COLUMN "EMERGENCY"."SYS_FILE"."UPDATE_BY" IS '修改人';
  509. COMMENT ON COLUMN "EMERGENCY"."SYS_FILE"."UPDATE_TIME" IS '更新时间';
  510. CREATE TABLE "EMERGENCY"."SYS_JOB"
  511. (
  512. "JOB_ID" BIGINT NOT NULL,
  513. "JOB_NAME" VARCHAR(64) NOT NULL,
  514. "JOB_GROUP" VARCHAR(64) NOT NULL,
  515. "JOB_ORDER" CHAR(1) DEFAULT '1',
  516. "JOB_TYPE" CHAR(1) DEFAULT '1' NOT NULL,
  517. "EXECUTE_PATH" VARCHAR(500),
  518. "CLASS_NAME" VARCHAR(500),
  519. "METHOD_NAME" VARCHAR(500),
  520. "METHOD_PARAMS_VALUE" VARCHAR(2000),
  521. "CRON_EXPRESSION" VARCHAR(255),
  522. "MISFIRE_POLICY" VARCHAR(20) DEFAULT '3',
  523. "JOB_TENANT_TYPE" CHAR(1) DEFAULT '1',
  524. "JOB_STATUS" CHAR(1) DEFAULT '0',
  525. "JOB_EXECUTE_STATUS" CHAR(1) DEFAULT '0',
  526. "CREATE_BY" VARCHAR(64),
  527. "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
  528. "UPDATE_BY" VARCHAR(64) DEFAULT '',
  529. "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
  530. "START_TIME" TIMESTAMP(0),
  531. "PREVIOUS_TIME" TIMESTAMP(0),
  532. "NEXT_TIME" TIMESTAMP(0),
  533. "TENANT_ID" BIGINT DEFAULT 1,
  534. "REMARK" VARCHAR(500) DEFAULT '',
  535. NOT CLUSTER PRIMARY KEY("JOB_ID", "JOB_NAME", "JOB_GROUP")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  536. COMMENT ON TABLE "EMERGENCY"."SYS_JOB" IS '定时任务调度表';
  537. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."CLASS_NAME" IS 'job_type=1时,类完整路径;job_type=2时,spring bean名称;其它值为空';
  538. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."CREATE_BY" IS '创建者';
  539. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."CREATE_TIME" IS '创建时间';
  540. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."CRON_EXPRESSION" IS 'cron执行表达式';
  541. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."EXECUTE_PATH" IS 'job_type=3时,rest调用地址,仅支持rest get协议,需要增加String返回值,0成功,1失败;job_type=4时,jar路径;其它值为空';
  542. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."JOB_EXECUTE_STATUS" IS '状态(0正常 1异常)';
  543. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."JOB_GROUP" IS '任务组名';
  544. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."JOB_ID" IS '任务id';
  545. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."JOB_NAME" IS '任务名称';
  546. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."JOB_ORDER" IS '组内执行顺利,值越大执行优先级越高,最大值9,最小值1';
  547. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."JOB_STATUS" IS '状态(1、未发布;2、运行中;3、暂停;4、删除;)';
  548. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."JOB_TENANT_TYPE" IS '1、多租户任务;2、非多租户任务';
  549. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."JOB_TYPE" IS '1、java类;2、spring bean名称;3、rest调用;4、jar调用;9其他';
  550. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."METHOD_NAME" IS '任务方法';
  551. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."METHOD_PARAMS_VALUE" IS '参数值';
  552. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."MISFIRE_POLICY" IS '错失执行策略(1错失周期立即执行 2错失周期执行一次 3下周期执行)';
  553. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."NEXT_TIME" IS '下次执行时间';
  554. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."PREVIOUS_TIME" IS '上次执行时间';
  555. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."REMARK" IS '备注信息';
  556. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."START_TIME" IS '初次执行时间';
  557. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."TENANT_ID" IS '租户';
  558. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."UPDATE_BY" IS '更新者';
  559. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB"."UPDATE_TIME" IS '更新时间';
  560. CREATE TABLE "EMERGENCY"."SYS_JOB_LOG"
  561. (
  562. "JOB_LOG_ID" BIGINT NOT NULL,
  563. "JOB_ID" BIGINT NOT NULL,
  564. "JOB_NAME" VARCHAR(64),
  565. "JOB_GROUP" VARCHAR(64),
  566. "JOB_ORDER" CHAR(1),
  567. "JOB_TYPE" CHAR(1) DEFAULT '1' NOT NULL,
  568. "EXECUTE_PATH" VARCHAR(500),
  569. "CLASS_NAME" VARCHAR(500),
  570. "METHOD_NAME" VARCHAR(500),
  571. "METHOD_PARAMS_VALUE" VARCHAR(2000),
  572. "CRON_EXPRESSION" VARCHAR(255),
  573. "JOB_MESSAGE" VARCHAR(500),
  574. "JOB_LOG_STATUS" CHAR(1) DEFAULT '0',
  575. "EXECUTE_TIME" VARCHAR(30),
  576. "EXCEPTION_INFO" VARCHAR(2000) DEFAULT '',
  577. "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
  578. "TENANT_ID" BIGINT DEFAULT 1 NOT NULL,
  579. NOT CLUSTER PRIMARY KEY("JOB_LOG_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  580. COMMENT ON TABLE "EMERGENCY"."SYS_JOB_LOG" IS '定时任务执行日志表';
  581. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."CLASS_NAME" IS 'job_type=1时,类完整路径;job_type=2时,spring bean名称;其它值为空';
  582. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."CREATE_TIME" IS '创建时间';
  583. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."CRON_EXPRESSION" IS 'cron执行表达式';
  584. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."EXCEPTION_INFO" IS '异常信息';
  585. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."EXECUTE_PATH" IS 'job_type=3时,rest调用地址,仅支持post协议;job_type=4时,jar路径;其它值为空';
  586. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."EXECUTE_TIME" IS '执行时间';
  587. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."JOB_GROUP" IS '任务组名';
  588. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."JOB_ID" IS '任务id';
  589. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."JOB_LOG_ID" IS '任务日志ID';
  590. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."JOB_LOG_STATUS" IS '执行状态(0正常 1失败)';
  591. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."JOB_MESSAGE" IS '日志信息';
  592. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."JOB_NAME" IS '任务名称';
  593. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."JOB_ORDER" IS '组内执行顺利,值越大执行优先级越高,最大值9,最小值1';
  594. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."JOB_TYPE" IS '1、java类;2、spring bean名称;3、rest调用;4、jar调用;9其他';
  595. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."METHOD_NAME" IS '任务方法';
  596. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."METHOD_PARAMS_VALUE" IS '参数值';
  597. COMMENT ON COLUMN "EMERGENCY"."SYS_JOB_LOG"."TENANT_ID" IS '租户id';
  598. CREATE TABLE "EMERGENCY"."SYS_LOG"
  599. (
  600. "ID" BIGINT NOT NULL,
  601. "LOG_TYPE" CHAR(1) DEFAULT '0',
  602. "TITLE" VARCHAR(255),
  603. "SERVICE_ID" VARCHAR(32),
  604. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  605. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  606. "CREATE_TIME" TIMESTAMP(0),
  607. "UPDATE_TIME" TIMESTAMP(0),
  608. "REMOTE_ADDR" VARCHAR(255),
  609. "USER_AGENT" VARCHAR(1000),
  610. "REQUEST_URI" VARCHAR(255),
  611. "METHOD" VARCHAR(10),
  612. "PARAMS" TEXT,
  613. "TIME" BIGINT,
  614. "DEL_FLAG" CHAR(1) DEFAULT '0',
  615. "EXCEPTION" TEXT,
  616. "TENANT_ID" BIGINT DEFAULT 0,
  617. "REQUEST_PARAM" TEXT,
  618. "RESPONSE_PARAM" TEXT,
  619. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  620. COMMENT ON TABLE "EMERGENCY"."SYS_LOG" IS '日志表';
  621. COMMENT ON COLUMN "EMERGENCY"."SYS_LOG"."CREATE_BY" IS '创建人';
  622. COMMENT ON COLUMN "EMERGENCY"."SYS_LOG"."CREATE_TIME" IS '创建时间';
  623. COMMENT ON COLUMN "EMERGENCY"."SYS_LOG"."ID" IS '编号';
  624. COMMENT ON COLUMN "EMERGENCY"."SYS_LOG"."REQUEST_PARAM" IS '入参';
  625. COMMENT ON COLUMN "EMERGENCY"."SYS_LOG"."RESPONSE_PARAM" IS '出参';
  626. COMMENT ON COLUMN "EMERGENCY"."SYS_LOG"."TENANT_ID" IS '所属租户';
  627. COMMENT ON COLUMN "EMERGENCY"."SYS_LOG"."TIME" IS '执行时间';
  628. COMMENT ON COLUMN "EMERGENCY"."SYS_LOG"."UPDATE_BY" IS '修改人';
  629. COMMENT ON COLUMN "EMERGENCY"."SYS_LOG"."UPDATE_TIME" IS '更新时间';
  630. CREATE OR REPLACE INDEX "SYS_LOG_CREATE_DATE" ON "EMERGENCY"."SYS_LOG"("CREATE_TIME" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  631. CREATE OR REPLACE INDEX "SYS_LOG_REQUEST_URI" ON "EMERGENCY"."SYS_LOG"("REQUEST_URI" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  632. CREATE OR REPLACE INDEX "SYS_LOG_TYPE" ON "EMERGENCY"."SYS_LOG"("LOG_TYPE" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  633. CREATE TABLE "EMERGENCY"."SYS_MENU"
  634. (
  635. "MENU_ID" BIGINT NOT NULL,
  636. "NAME" VARCHAR(255),
  637. "PERMISSION" VARCHAR(255),
  638. "PATH" VARCHAR(128),
  639. "PARENT_ID" BIGINT,
  640. "ICON" VARCHAR(32),
  641. "SORT_ORDER" INT DEFAULT 1,
  642. "KEEP_ALIVE" CHAR(1) DEFAULT '0',
  643. "MENU_TYPE" CHAR(1) DEFAULT '0',
  644. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  645. "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP(),
  646. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  647. "UPDATE_TIME" TIMESTAMP(0),
  648. "DEL_FLAG" CHAR(1) DEFAULT '0',
  649. "TENANT_ID" DECIMAL,
  650. NOT CLUSTER PRIMARY KEY("MENU_ID"),
  651. CHECK("TENANT_ID" >= 0)) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  652. COMMENT ON TABLE "EMERGENCY"."SYS_MENU" IS '菜单权限表';
  653. COMMENT ON COLUMN "EMERGENCY"."SYS_MENU"."CREATE_BY" IS '创建人';
  654. COMMENT ON COLUMN "EMERGENCY"."SYS_MENU"."CREATE_TIME" IS '创建时间';
  655. COMMENT ON COLUMN "EMERGENCY"."SYS_MENU"."MENU_ID" IS '菜单ID';
  656. COMMENT ON COLUMN "EMERGENCY"."SYS_MENU"."PARENT_ID" IS '父菜单ID';
  657. COMMENT ON COLUMN "EMERGENCY"."SYS_MENU"."SORT_ORDER" IS '排序值';
  658. COMMENT ON COLUMN "EMERGENCY"."SYS_MENU"."TENANT_ID" IS '租户ID';
  659. COMMENT ON COLUMN "EMERGENCY"."SYS_MENU"."UPDATE_BY" IS '修改人';
  660. COMMENT ON COLUMN "EMERGENCY"."SYS_MENU"."UPDATE_TIME" IS '更新时间';
  661. CREATE TABLE "EMERGENCY"."SYS_OAUTH_CLIENT_DETAILS"
  662. (
  663. "ID" BIGINT NOT NULL,
  664. "CLIENT_ID" VARCHAR(32) NOT NULL,
  665. "RESOURCE_IDS" VARCHAR(256),
  666. "CLIENT_SECRET" VARCHAR(256),
  667. "SCOPE" VARCHAR(256),
  668. "AUTHORIZED_GRANT_TYPES" VARCHAR(256),
  669. "WEB_SERVER_REDIRECT_URI" VARCHAR(256),
  670. "AUTHORITIES" VARCHAR(256),
  671. "ACCESS_TOKEN_VALIDITY" INT,
  672. "REFRESH_TOKEN_VALIDITY" INT,
  673. "ADDITIONAL_INFORMATION" VARCHAR(4096),
  674. "AUTOAPPROVE" VARCHAR(256),
  675. "DEL_FLAG" CHAR(1) DEFAULT '0',
  676. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  677. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  678. "CREATE_TIME" TIMESTAMP(0),
  679. "UPDATE_TIME" TIMESTAMP(0),
  680. "TENANT_ID" BIGINT DEFAULT 0 NOT NULL,
  681. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  682. COMMENT ON TABLE "EMERGENCY"."SYS_OAUTH_CLIENT_DETAILS" IS '终端信息表';
  683. COMMENT ON COLUMN "EMERGENCY"."SYS_OAUTH_CLIENT_DETAILS"."CREATE_BY" IS '创建人';
  684. COMMENT ON COLUMN "EMERGENCY"."SYS_OAUTH_CLIENT_DETAILS"."CREATE_TIME" IS '上传时间';
  685. COMMENT ON COLUMN "EMERGENCY"."SYS_OAUTH_CLIENT_DETAILS"."ID" IS 'ID';
  686. COMMENT ON COLUMN "EMERGENCY"."SYS_OAUTH_CLIENT_DETAILS"."TENANT_ID" IS '所属租户';
  687. COMMENT ON COLUMN "EMERGENCY"."SYS_OAUTH_CLIENT_DETAILS"."UPDATE_BY" IS '修改人';
  688. COMMENT ON COLUMN "EMERGENCY"."SYS_OAUTH_CLIENT_DETAILS"."UPDATE_TIME" IS '更新时间';
  689. CREATE TABLE "EMERGENCY"."SYS_POST"
  690. (
  691. "POST_ID" BIGINT NOT NULL,
  692. "POST_CODE" VARCHAR(64) NOT NULL,
  693. "POST_NAME" VARCHAR(50) NOT NULL,
  694. "POST_SORT" INT NOT NULL,
  695. "REMARK" VARCHAR(500),
  696. "DEL_FLAG" CHAR(1) DEFAULT '0' NOT NULL,
  697. "CREATE_TIME" TIMESTAMP(0),
  698. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  699. "UPDATE_TIME" TIMESTAMP(0),
  700. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  701. "TENANT_ID" BIGINT,
  702. NOT CLUSTER PRIMARY KEY("POST_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  703. COMMENT ON TABLE "EMERGENCY"."SYS_POST" IS '岗位信息表';
  704. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."CREATE_BY" IS '创建人';
  705. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."CREATE_TIME" IS '创建时间';
  706. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."DEL_FLAG" IS '是否删除 -1:已删除 0:正常';
  707. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."POST_CODE" IS '岗位编码';
  708. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."POST_ID" IS '岗位ID';
  709. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."POST_NAME" IS '岗位名称';
  710. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."POST_SORT" IS '岗位排序';
  711. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."REMARK" IS '岗位描述';
  712. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."TENANT_ID" IS '租户ID';
  713. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."UPDATE_BY" IS '更新人';
  714. COMMENT ON COLUMN "EMERGENCY"."SYS_POST"."UPDATE_TIME" IS '更新时间';
  715. CREATE TABLE "EMERGENCY"."SYS_PUBLIC_PARAM"
  716. (
  717. "PUBLIC_ID" BIGINT NOT NULL,
  718. "PUBLIC_NAME" VARCHAR(128),
  719. "PUBLIC_KEY" VARCHAR(128),
  720. "PUBLIC_VALUE" VARCHAR(128),
  721. "STATUS" CHAR(1) DEFAULT '0',
  722. "VALIDATE_CODE" VARCHAR(64),
  723. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  724. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  725. "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
  726. "UPDATE_TIME" TIMESTAMP(0),
  727. "PUBLIC_TYPE" CHAR(1) DEFAULT '0',
  728. "SYSTEM_FLAG" CHAR(1) DEFAULT '0',
  729. "DEL_FLAG" CHAR(1) DEFAULT '0',
  730. "TENANT_ID" BIGINT,
  731. NOT CLUSTER PRIMARY KEY("PUBLIC_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  732. COMMENT ON TABLE "EMERGENCY"."SYS_PUBLIC_PARAM" IS '公共参数配置表';
  733. COMMENT ON COLUMN "EMERGENCY"."SYS_PUBLIC_PARAM"."CREATE_BY" IS '创建人';
  734. COMMENT ON COLUMN "EMERGENCY"."SYS_PUBLIC_PARAM"."CREATE_TIME" IS '创建时间';
  735. COMMENT ON COLUMN "EMERGENCY"."SYS_PUBLIC_PARAM"."PUBLIC_ID" IS '编号';
  736. COMMENT ON COLUMN "EMERGENCY"."SYS_PUBLIC_PARAM"."TENANT_ID" IS '租户ID';
  737. COMMENT ON COLUMN "EMERGENCY"."SYS_PUBLIC_PARAM"."UPDATE_BY" IS '修改人';
  738. COMMENT ON COLUMN "EMERGENCY"."SYS_PUBLIC_PARAM"."UPDATE_TIME" IS '修改时间';
  739. CREATE TABLE "EMERGENCY"."SYS_ROLE"
  740. (
  741. "ROLE_ID" BIGINT NOT NULL,
  742. "ROLE_NAME" VARCHAR(64),
  743. "ROLE_CODE" VARCHAR(64),
  744. "ROLE_DESC" VARCHAR(255),
  745. "DS_TYPE" CHAR(1) DEFAULT '2',
  746. "DS_SCOPE" VARCHAR(255),
  747. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  748. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  749. "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
  750. "UPDATE_TIME" TIMESTAMP(0),
  751. "DEL_FLAG" CHAR(1) DEFAULT '0',
  752. "TENANT_ID" BIGINT,
  753. NOT CLUSTER PRIMARY KEY("ROLE_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  754. COMMENT ON TABLE "EMERGENCY"."SYS_ROLE" IS '系统角色表';
  755. COMMENT ON COLUMN "EMERGENCY"."SYS_ROLE"."CREATE_BY" IS '创建人';
  756. COMMENT ON COLUMN "EMERGENCY"."SYS_ROLE"."UPDATE_BY" IS '修改人';
  757. CREATE OR REPLACE INDEX "ROLE_IDX1_ROLE_CODE" ON "EMERGENCY"."SYS_ROLE"("ROLE_CODE" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  758. CREATE TABLE "EMERGENCY"."SYS_ROLE_MENU"
  759. (
  760. "ROLE_ID" BIGINT NOT NULL,
  761. "MENU_ID" BIGINT NOT NULL,
  762. NOT CLUSTER PRIMARY KEY("ROLE_ID", "MENU_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  763. COMMENT ON TABLE "EMERGENCY"."SYS_ROLE_MENU" IS '角色菜单表';
  764. COMMENT ON COLUMN "EMERGENCY"."SYS_ROLE_MENU"."MENU_ID" IS '菜单ID';
  765. COMMENT ON COLUMN "EMERGENCY"."SYS_ROLE_MENU"."ROLE_ID" IS '角色ID';
  766. CREATE TABLE "EMERGENCY"."SYS_SOCIAL_DETAILS"
  767. (
  768. "ID" BIGINT NOT NULL,
  769. "TYPE" VARCHAR(16),
  770. "REMARK" VARCHAR(64),
  771. "APP_ID" VARCHAR(64),
  772. "APP_SECRET" VARCHAR(64),
  773. "REDIRECT_URL" VARCHAR(128),
  774. "EXT" VARCHAR(255),
  775. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  776. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  777. "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP(),
  778. "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP(),
  779. "DEL_FLAG" CHAR(1) DEFAULT '0',
  780. "TENANT_ID" BIGINT DEFAULT 0 NOT NULL,
  781. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  782. COMMENT ON TABLE "EMERGENCY"."SYS_SOCIAL_DETAILS" IS '系统社交登录账号表';
  783. COMMENT ON COLUMN "EMERGENCY"."SYS_SOCIAL_DETAILS"."CREATE_BY" IS '创建人';
  784. COMMENT ON COLUMN "EMERGENCY"."SYS_SOCIAL_DETAILS"."CREATE_TIME" IS '创建时间';
  785. COMMENT ON COLUMN "EMERGENCY"."SYS_SOCIAL_DETAILS"."EXT" IS '拓展字段';
  786. COMMENT ON COLUMN "EMERGENCY"."SYS_SOCIAL_DETAILS"."ID" IS '主鍵';
  787. COMMENT ON COLUMN "EMERGENCY"."SYS_SOCIAL_DETAILS"."TENANT_ID" IS '所属租户';
  788. COMMENT ON COLUMN "EMERGENCY"."SYS_SOCIAL_DETAILS"."UPDATE_BY" IS '修改人';
  789. COMMENT ON COLUMN "EMERGENCY"."SYS_SOCIAL_DETAILS"."UPDATE_TIME" IS '更新时间';
  790. CREATE TABLE "EMERGENCY"."SYS_TENANT"
  791. (
  792. "ID" BIGINT NOT NULL,
  793. "NAME" VARCHAR(255),
  794. "CODE" VARCHAR(64),
  795. "TENANT_DOMAIN" VARCHAR(255),
  796. "START_TIME" TIMESTAMP(0),
  797. "END_TIME" TIMESTAMP(0),
  798. "STATUS" CHAR(1) DEFAULT '0',
  799. "DEL_FLAG" CHAR(1) DEFAULT '0',
  800. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  801. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  802. "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
  803. "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
  804. "MENU_ID" BIGINT,
  805. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  806. COMMENT ON TABLE "EMERGENCY"."SYS_TENANT" IS '租户表';
  807. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT"."CREATE_BY" IS '创建人';
  808. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT"."CREATE_TIME" IS '创建';
  809. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT"."END_TIME" IS '结束时间';
  810. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT"."ID" IS '租户id';
  811. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT"."START_TIME" IS '开始时间';
  812. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT"."UPDATE_BY" IS '修改人';
  813. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT"."UPDATE_TIME" IS '更新时间';
  814. CREATE TABLE "EMERGENCY"."SYS_TENANT_MENU"
  815. (
  816. "ID" BIGINT NOT NULL,
  817. "NAME" VARCHAR(255) NOT NULL,
  818. "MENU_IDS" TEXT NOT NULL,
  819. "STATUS" CHAR(1) DEFAULT '0' NOT NULL,
  820. "DEL_FLAG" CHAR(1) DEFAULT '0',
  821. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  822. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  823. "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
  824. "UPDATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP() NOT NULL,
  825. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  826. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT_MENU"."CREATE_BY" IS '创建人';
  827. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT_MENU"."CREATE_TIME" IS '创建';
  828. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT_MENU"."MENU_IDS" IS '菜单id集合';
  829. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT_MENU"."NAME" IS '租户菜单名称';
  830. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT_MENU"."STATUS" IS '租户菜单,9:冻结,0:正常';
  831. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT_MENU"."UPDATE_BY" IS '修改人';
  832. COMMENT ON COLUMN "EMERGENCY"."SYS_TENANT_MENU"."UPDATE_TIME" IS '更新时间';
  833. CREATE TABLE "EMERGENCY"."SYS_TREE_DICT"
  834. (
  835. "ID" VARCHAR2(255) NOT NULL,
  836. "PARENT_ID" VARCHAR2(255),
  837. "NAME_" VARCHAR2(255),
  838. "CONTENT_" VARCHAR2(200),
  839. "SORT_" INTEGER,
  840. "TYPE_" INTEGER,
  841. "DEL_FLAG" INTEGER,
  842. "CREATE_BY" BIGINT,
  843. "UPDATE_BY" BIGINT,
  844. "CREATE_TIME" TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(),
  845. "UPDATE_TIME" TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(),
  846. "CODE_" VARCHAR2(255),
  847. "PATH_" VARCHAR2(1000),
  848. "DIFFERENCE_" VARCHAR2(10),
  849. "PARENT_CODE" VARCHAR2(255),
  850. NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  851. COMMENT ON TABLE "EMERGENCY"."SYS_TREE_DICT" IS '系统树形字典';
  852. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."CODE_" IS '物资code';
  853. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."CONTENT_" IS '内容';
  854. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."CREATE_BY" IS '创建人';
  855. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."CREATE_TIME" IS '创建时间';
  856. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."DEL_FLAG" IS '是否删除 -1:已删除 0:正常';
  857. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."DIFFERENCE_" IS '1 物资大类 2 物资类别 3 物资名称 4 物资单位';
  858. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."ID" IS 'ID';
  859. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."NAME_" IS '名称';
  860. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."PARENT_CODE" IS '父级CODE';
  861. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."PARENT_ID" IS '父级ID';
  862. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."PATH_" IS '物资code全路径';
  863. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."SORT_" IS '排序';
  864. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."TYPE_" IS '类型 1 物资信息';
  865. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."UPDATE_BY" IS '修改人';
  866. COMMENT ON COLUMN "EMERGENCY"."SYS_TREE_DICT"."UPDATE_TIME" IS '修改时间';
  867. CREATE TABLE "EMERGENCY"."SYS_USER"
  868. (
  869. "USER_ID" VARCHAR(50) NOT NULL,
  870. "USERNAME" VARCHAR(64),
  871. "PASSWORD" VARCHAR(255),
  872. "SALT" VARCHAR(255),
  873. "PHONE" VARCHAR(20),
  874. "AVATAR" VARCHAR(255),
  875. "NICKNAME" VARCHAR(64),
  876. "NAME" VARCHAR(64),
  877. "EMAIL" VARCHAR(128),
  878. "DEPT_ID" BIGINT,
  879. "CREATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  880. "UPDATE_BY" VARCHAR(64) DEFAULT '' NOT NULL,
  881. "CREATE_TIME" TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP(),
  882. "UPDATE_TIME" TIMESTAMP(0),
  883. "LOCK_FLAG" CHAR(1) DEFAULT '0',
  884. "DEL_FLAG" CHAR(1) DEFAULT '0',
  885. "WX_OPENID" VARCHAR(32),
  886. "MINI_OPENID" VARCHAR(32),
  887. "QQ_OPENID" VARCHAR(32),
  888. "GITEE_LOGIN" VARCHAR(100),
  889. "OSC_ID" VARCHAR(100),
  890. "TENANT_ID" BIGINT DEFAULT 0 NOT NULL,
  891. NOT CLUSTER PRIMARY KEY("USER_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  892. COMMENT ON TABLE "EMERGENCY"."SYS_USER" IS '用户表';
  893. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."CREATE_BY" IS '创建人';
  894. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."CREATE_TIME" IS '创建时间';
  895. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."DEPT_ID" IS '部门ID';
  896. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."EMAIL" IS '拓展字段:邮箱';
  897. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."GITEE_LOGIN" IS '码云 标识';
  898. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."MINI_OPENID" IS '小程序openId';
  899. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."NAME" IS '拓展字段:姓名';
  900. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."NICKNAME" IS '拓展字段:昵称';
  901. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."OSC_ID" IS '开源中国 标识';
  902. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."QQ_OPENID" IS 'QQ openId';
  903. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."TENANT_ID" IS '所属租户';
  904. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."UPDATE_BY" IS '修改人';
  905. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."UPDATE_TIME" IS '修改时间';
  906. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."USER_ID" IS '主键ID';
  907. COMMENT ON COLUMN "EMERGENCY"."SYS_USER"."WX_OPENID" IS '微信登录openId';
  908. CREATE OR REPLACE INDEX "USER_QQ_OPENID" ON "EMERGENCY"."SYS_USER"("QQ_OPENID" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  909. CREATE OR REPLACE INDEX "USER_WX_OPENID" ON "EMERGENCY"."SYS_USER"("WX_OPENID" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  910. CREATE OR REPLACE INDEX "USER_IDX1_USERNAME" ON "EMERGENCY"."SYS_USER"("USERNAME" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  911. CREATE OR REPLACE UNIQUE INDEX "idx_name_USERNAME" ON "EMERGENCY"."SYS_USER"("USERNAME" ASC) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  912. CREATE TABLE "EMERGENCY"."SYS_USER_POST"
  913. (
  914. "USER_ID" VARCHAR(50) NOT NULL,
  915. "POST_ID" BIGINT NOT NULL,
  916. NOT CLUSTER PRIMARY KEY("USER_ID", "POST_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  917. COMMENT ON TABLE "EMERGENCY"."SYS_USER_POST" IS '用户与岗位关联表';
  918. COMMENT ON COLUMN "EMERGENCY"."SYS_USER_POST"."POST_ID" IS '岗位ID';
  919. COMMENT ON COLUMN "EMERGENCY"."SYS_USER_POST"."USER_ID" IS '用户ID';
  920. CREATE TABLE "EMERGENCY"."SYS_USER_ROLE"
  921. (
  922. "USER_ID" VARCHAR(50) NOT NULL,
  923. "ROLE_ID" BIGINT NOT NULL,
  924. NOT CLUSTER PRIMARY KEY("USER_ID", "ROLE_ID")) STORAGE(ON "EMERGENCY", CLUSTERBTR) ;
  925. COMMENT ON TABLE "EMERGENCY"."SYS_USER_ROLE" IS '用户角色表';
  926. COMMENT ON COLUMN "EMERGENCY"."SYS_USER_ROLE"."ROLE_ID" IS '角色ID';
  927. COMMENT ON COLUMN "EMERGENCY"."SYS_USER_ROLE"."USER_ID" IS '用户ID';