tables.sql 78 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513
  1. -- 如果表存在则删除
  2. DROP TABLE IF EXISTS `data_centers`;
  3. -- 创建数据中心表
  4. CREATE TABLE `data_centers` (
  5. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  6. `data_center` VARCHAR(50) NOT NULL COMMENT '数据中心',
  7. `name` VARCHAR(50) NOT NULL COMMENT '名称',
  8. `address` VARCHAR(255) COMMENT '地理位置',
  9. `area` DECIMAL(10,2) COMMENT '建筑面积',
  10. `rooms` INT(10) COMMENT '机房数量',
  11. `double_power` BIT(1) DEFAULT 0 COMMENT '双市电输入',
  12. `admin` VARCHAR(40) COMMENT '联系人',
  13. `moible` VARCHAR(40) COMMENT '联系电话',
  14. `remark` TEXT COMMENT '备注',
  15. `created_by` BIGINT(10) COMMENT '创建者',
  16. `updated_by` BIGINT(10) COMMENT '更新者',
  17. `deleted_by` BIGINT(10) COMMENT '删除者',
  18. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  19. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  20. `deleted_at` DATETIME COMMENT '删除时间',
  21. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  22. PRIMARY KEY (`id`),
  23. INDEX `idx_data_center` (`data_center`),
  24. INDEX `idx_deleted_flag` (`deleted_flag`)
  25. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据中心表';
  26. -- 如果表存在则删除
  27. DROP TABLE IF EXISTS `computer_rooms`;
  28. -- 创建机房表
  29. CREATE TABLE `computer_rooms` (
  30. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  31. `park_id` BIGINT(10) NOT NULL COMMENT '所属数据中心机房',
  32. `build` VARCHAR(50) COMMENT '楼栋',
  33. `floor` VARCHAR(10) COMMENT '楼层',
  34. `name` VARCHAR(100) NOT NULL COMMENT '机房名称',
  35. `area` DECIMAL(10,2) COMMENT '机房面积',
  36. `cabinets` BIGINT(10) DEFAULT 0 COMMENT '机柜数量',
  37. `admin` VARCHAR(255) COMMENT '管理员',
  38. `moible` VARCHAR(40) COMMENT '联系电话',
  39. `remark` TEXT COMMENT '备注',
  40. `created_by` BIGINT(10) COMMENT '创建者',
  41. `updated_by` BIGINT(10) COMMENT '更新者',
  42. `deleted_by` BIGINT(10) COMMENT '删除者',
  43. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  44. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  45. `deleted_at` DATETIME COMMENT '删除时间',
  46. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  47. PRIMARY KEY (`id`),
  48. INDEX `idx_park_id` (`park_id`),
  49. INDEX `idx_name` (`name`),
  50. INDEX `idx_deleted_flag` (`deleted_flag`),
  51. CONSTRAINT `fk_computer_rooms_park` FOREIGN KEY (`park_id`) REFERENCES `data_centers` (`id`)
  52. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机房表';
  53. -- 如果表存在则删除
  54. DROP TABLE IF EXISTS `cabinets`;
  55. -- 创建机柜信息表
  56. CREATE TABLE `cabinets` (
  57. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  58. `room_id` BIGINT(10) NOT NULL COMMENT '所属机房',
  59. `passageway` VARCHAR(50) COMMENT '所属通道',
  60. `cabinet_id` VARCHAR(50) NOT NULL COMMENT '机柜ID',
  61. `cabinet_name` VARCHAR(100) NOT NULL COMMENT '机柜名称',
  62. `power` DECIMAL(10,2) DEFAULT 0.00 COMMENT '设计功率',
  63. `capacity` BIGINT(10) DEFAULT 0 COMMENT '机柜容量',
  64. `double_power` BIT(1) DEFAULT 0 COMMENT '单/双电路',
  65. `remark` TEXT COMMENT '备注',
  66. `created_by` BIGINT(10) COMMENT '创建者',
  67. `updated_by` BIGINT(10) COMMENT '更新者',
  68. `deleted_by` BIGINT(10) COMMENT '删除者',
  69. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  70. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  71. `deleted_at` DATETIME COMMENT '删除时间',
  72. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  73. PRIMARY KEY (`id`),
  74. UNIQUE INDEX `idx_cabinet_id` (`cabinet_id`),
  75. INDEX `idx_room_id` (`room_id`),
  76. INDEX `idx_cabinet_name` (`cabinet_name`),
  77. INDEX `idx_deleted_flag` (`deleted_flag`),
  78. CONSTRAINT `fk_cabinets_room` FOREIGN KEY (`room_id`) REFERENCES `computer_rooms` (`id`)
  79. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机柜信息表';
  80. -- 如果表存在则删除
  81. DROP TABLE IF EXISTS `devices`;
  82. -- 创建设备基本信息表
  83. CREATE TABLE `devices` (
  84. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  85. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  86. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  87. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  88. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  89. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  90. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  91. `user_unit` VARCHAR(120) COMMENT '使用单位',
  92. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  93. `application_time` DATETIME COMMENT '申请时间',
  94. `recovery_time` DATETIME COMMENT '回收时间',
  95. `access_network` VARCHAR(20) COMMENT '接入网络',
  96. `sn` VARCHAR(50) COMMENT '设备序列号',
  97. `device_name` VARCHAR(50) NOT NULL COMMENT '设备名称',
  98. `manufacturer` VARCHAR(100) COMMENT '厂商',
  99. `device_model` VARCHAR(50) COMMENT '设备型号',
  100. `device_type` VARCHAR(20) COMMENT '设备类型',
  101. `power` INT(10) DEFAULT 0 COMMENT '额定功率',
  102. `u_height` INT(3) DEFAULT 1 COMMENT '设备高度',
  103. `u_begin` INT(3) COMMENT '起始U位',
  104. `u_end` INT(2) COMMENT '结束U位',
  105. `cabinet` VARCHAR(100) COMMENT '所属机柜',
  106. `double_power` VARCHAR(20) COMMENT '电源模块',
  107. `hardware_config` TEXT COMMENT '硬件配置参数',
  108. `application_desc` TEXT COMMENT '应用描述',
  109. `status` VARCHAR(20) DEFAULT 'inactive' COMMENT '状态',
  110. `run_status` VARCHAR(20) DEFAULT 'stopped' COMMENT '运行状态',
  111. `manage_type` VARCHAR(20) COMMENT '管理类型',
  112. `ip_type` VARCHAR(10) COMMENT '地址类型',
  113. `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
  114. `ip_address` VARCHAR(15) COMMENT 'IP地址',
  115. `remark` TEXT COMMENT '备注',
  116. `created_by` BIGINT(10) COMMENT '创建者',
  117. `updated_by` BIGINT(10) COMMENT '更新者',
  118. `deleted_by` BIGINT(10) COMMENT '删除者',
  119. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  120. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  121. `deleted_at` DATETIME COMMENT '删除时间',
  122. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  123. PRIMARY KEY (`id`),
  124. UNIQUE INDEX `idx_sn` (`sn`),
  125. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  126. INDEX `idx_device_name` (`device_name`),
  127. INDEX `idx_cabinet` (`cabinet`),
  128. INDEX `idx_status` (`status`),
  129. INDEX `idx_ip_address` (`ip_address`),
  130. INDEX `idx_deleted_flag` (`deleted_flag`)
  131. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='设备基本信息表';
  132. -- 如果表存在则删除
  133. DROP TABLE IF EXISTS `cloud_instances`;
  134. -- 创建云主机服务表
  135. CREATE TABLE `cloud_instances` (
  136. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  137. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  138. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  139. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  140. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  141. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  142. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  143. `user_unit` VARCHAR(120) COMMENT '使用单位',
  144. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  145. `application_time` DATETIME COMMENT '申请时间',
  146. `recovery_time` DATETIME COMMENT '回收时间',
  147. `cloud_processor_architecture` VARCHAR(30) COMMENT '云环境',
  148. `instance_type` VARCHAR(20) COMMENT '云主机类型',
  149. `operating_system` VARCHAR(20) COMMENT '操作系统',
  150. `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
  151. `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
  152. `vcpu` INT(6) DEFAULT 1 COMMENT 'vCPU',
  153. `memory` INT(6) DEFAULT 1 COMMENT '内存',
  154. `system_disk` INT(6) DEFAULT 40 COMMENT '系统盘',
  155. `system_disk_type` VARCHAR(20) COMMENT '系统盘类型',
  156. `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
  157. `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
  158. `ip_address` VARCHAR(30) COMMENT 'IP地址',
  159. `host_status` INT(2) DEFAULT 0 COMMENT '主机状态',
  160. `remark` VARCHAR(255) COMMENT '备注',
  161. `created_by` BIGINT(10) COMMENT '创建者',
  162. `updated_by` BIGINT(10) COMMENT '更新者',
  163. `deleted_by` BIGINT(10) COMMENT '删除者',
  164. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  165. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  166. `deleted_at` DATETIME COMMENT '删除时间',
  167. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  168. PRIMARY KEY (`id`),
  169. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  170. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  171. INDEX `idx_instance_name` (`instance_name`),
  172. INDEX `idx_ip_address` (`ip_address`),
  173. INDEX `idx_host_status` (`host_status`),
  174. INDEX `idx_deleted_flag` (`deleted_flag`)
  175. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='云主机服务表';
  176. -- 如果表存在则删除
  177. DROP TABLE IF EXISTS `ai_computing_instances`;
  178. -- 创建AI算力服务表
  179. CREATE TABLE `ai_computing_instances` (
  180. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  181. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  182. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  183. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  184. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  185. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  186. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  187. `user_unit` VARCHAR(120) COMMENT '使用单位',
  188. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  189. `application_time` DATETIME COMMENT '申请时间',
  190. `recovery_time` DATETIME COMMENT '回收时间',
  191. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  192. `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
  193. `computing_type` VARCHAR(50) COMMENT '算力卡类型',
  194. `configuration_params` TEXT COMMENT '配置参数',
  195. `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
  196. `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
  197. `ip_address` VARCHAR(30) COMMENT 'IP地址',
  198. `host_status` INT(2) DEFAULT 0 COMMENT '主机状态',
  199. `remark` TEXT COMMENT '备注',
  200. `created_by` BIGINT(10) COMMENT '创建者',
  201. `updated_by` BIGINT(10) COMMENT '更新者',
  202. `deleted_by` BIGINT(10) COMMENT '删除者',
  203. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  204. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  205. `deleted_at` DATETIME COMMENT '删除时间',
  206. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  207. PRIMARY KEY (`id`),
  208. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  209. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  210. INDEX `idx_instance_name` (`instance_name`),
  211. INDEX `idx_computing_type` (`computing_type`),
  212. INDEX `idx_ip_address` (`ip_address`),
  213. INDEX `idx_host_status` (`host_status`),
  214. INDEX `idx_deleted_flag` (`deleted_flag`)
  215. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='AI算力服务表';
  216. -- 如果表存在则删除
  217. DROP TABLE IF EXISTS `bare_metal_instances`;
  218. -- 创建定制裸金属服务表
  219. CREATE TABLE `bare_metal_instances` (
  220. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  221. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  222. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  223. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  224. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  225. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  226. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  227. `user_unit` VARCHAR(120) COMMENT '使用单位',
  228. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  229. `application_time` DATETIME COMMENT '申请时间',
  230. `recovery_time` DATETIME COMMENT '回收时间',
  231. `cloud_processor_architecture` VARCHAR(30) COMMENT '云环境',
  232. `operating_system` VARCHAR(20) COMMENT '操作系统',
  233. `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
  234. `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
  235. `device_sn` VARCHAR(50) COMMENT '设备序列号',
  236. `cpu_cores` INT(4) DEFAULT 1 COMMENT 'CPU核心数',
  237. `memory` INT(6) DEFAULT 1 COMMENT '内存',
  238. `system_disk` INT(6) DEFAULT 40 COMMENT '系统盘',
  239. `system_disk_type` VARCHAR(20) COMMENT '系统盘类型',
  240. `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
  241. `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
  242. `ip_address` VARCHAR(30) COMMENT 'IP地址',
  243. `host_status` INT(2) DEFAULT 0 COMMENT '主机状态',
  244. `remark` TEXT COMMENT '备注',
  245. `created_by` BIGINT(10) COMMENT '创建者',
  246. `updated_by` BIGINT(10) COMMENT '更新者',
  247. `deleted_by` BIGINT(10) COMMENT '删除者',
  248. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  249. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  250. `deleted_at` DATETIME COMMENT '删除时间',
  251. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  252. PRIMARY KEY (`id`),
  253. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  254. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  255. UNIQUE INDEX `idx_device_sn` (`device_sn`),
  256. INDEX `idx_instance_name` (`instance_name`),
  257. INDEX `idx_ip_address` (`ip_address`),
  258. INDEX `idx_host_status` (`host_status`),
  259. INDEX `idx_deleted_flag` (`deleted_flag`)
  260. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='定制裸金属服务表';
  261. -- 如果表存在则删除
  262. DROP TABLE IF EXISTS `image_services`;
  263. -- 创建镜像服务表
  264. CREATE TABLE `image_services` (
  265. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  266. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  267. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  268. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  269. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  270. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  271. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  272. `user_unit` VARCHAR(120) COMMENT '使用单位',
  273. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  274. `application_time` DATETIME COMMENT '申请时间',
  275. `recovery_time` DATETIME COMMENT '回收时间',
  276. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  277. `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
  278. `image_id` VARCHAR(100) NOT NULL COMMENT '镜像ID',
  279. `image_name` VARCHAR(100) NOT NULL COMMENT '镜像名称',
  280. `mirror_type` VARCHAR(100) COMMENT '镜像类型',
  281. `remark` TEXT COMMENT '备注',
  282. `created_by` BIGINT(10) COMMENT '创建者',
  283. `updated_by` BIGINT(10) COMMENT '更新者',
  284. `deleted_by` BIGINT(10) COMMENT '删除者',
  285. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  286. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  287. `deleted_at` DATETIME COMMENT '删除时间',
  288. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  289. PRIMARY KEY (`id`),
  290. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  291. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  292. UNIQUE INDEX `idx_image_id` (`image_id`),
  293. INDEX `idx_instance_name` (`instance_name`),
  294. INDEX `idx_image_name` (`image_name`),
  295. INDEX `idx_mirror_type` (`mirror_type`),
  296. INDEX `idx_deleted_flag` (`deleted_flag`)
  297. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='镜像服务表';
  298. -- 如果表存在则删除
  299. DROP TABLE IF EXISTS `elastic_scaling_services`;
  300. -- 创建弹性伸缩服务表
  301. CREATE TABLE `elastic_scaling_services` (
  302. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  303. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  304. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  305. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  306. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  307. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  308. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  309. `user_unit` VARCHAR(120) COMMENT '使用单位',
  310. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  311. `application_time` DATETIME COMMENT '申请时间',
  312. `recovery_time` DATETIME COMMENT '回收时间',
  313. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  314. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  315. `policy` VARCHAR(50) COMMENT '策略',
  316. `remark` TEXT COMMENT '备注',
  317. `created_by` BIGINT(10) COMMENT '创建者',
  318. `updated_by` BIGINT(10) COMMENT '更新者',
  319. `deleted_by` BIGINT(10) COMMENT '删除者',
  320. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  321. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  322. `deleted_at` DATETIME COMMENT '删除时间',
  323. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  324. PRIMARY KEY (`id`),
  325. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  326. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  327. INDEX `idx_instance_name` (`instance_name`),
  328. INDEX `idx_policy` (`policy`),
  329. INDEX `idx_deleted_flag` (`deleted_flag`)
  330. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='弹性伸缩服务表';
  331. -- 如果表存在则删除
  332. DROP TABLE IF EXISTS `cloud_disk_services`;
  333. -- 创建云硬盘存储服务表
  334. CREATE TABLE `cloud_disk_services` (
  335. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  336. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  337. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  338. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  339. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  340. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  341. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  342. `user_unit` VARCHAR(120) COMMENT '使用单位',
  343. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  344. `application_time` DATETIME COMMENT '申请时间',
  345. `recovery_time` DATETIME COMMENT '回收时间',
  346. `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
  347. `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
  348. `disk_id` VARCHAR(40) NOT NULL COMMENT '磁盘ID',
  349. `disk_type` VARCHAR(20) COMMENT '存储类型',
  350. `disk_size` INT(6) DEFAULT 0 COMMENT '存储容量',
  351. `remark` TEXT COMMENT '备注',
  352. `created_by` BIGINT(10) COMMENT '创建者',
  353. `updated_by` BIGINT(10) COMMENT '更新者',
  354. `deleted_by` BIGINT(10) COMMENT '删除者',
  355. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  356. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  357. `deleted_at` DATETIME COMMENT '删除时间',
  358. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  359. PRIMARY KEY (`id`),
  360. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  361. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  362. UNIQUE INDEX `idx_disk_id` (`disk_id`),
  363. INDEX `idx_instance_name` (`instance_name`),
  364. INDEX `idx_disk_type` (`disk_type`),
  365. INDEX `idx_deleted_flag` (`deleted_flag`)
  366. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='云硬盘存储服务表';
  367. -- 如果表存在则删除
  368. DROP TABLE IF EXISTS `file_storage_services`;
  369. -- 创建文件存储服务表
  370. CREATE TABLE `file_storage_services` (
  371. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  372. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  373. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  374. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  375. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  376. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  377. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  378. `user_unit` VARCHAR(120) COMMENT '使用单位',
  379. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  380. `application_time` DATETIME COMMENT '申请时间',
  381. `recovery_time` DATETIME COMMENT '回收时间',
  382. `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
  383. `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
  384. `name` VARCHAR(100) NOT NULL COMMENT '名称',
  385. `capacity` INT(6) DEFAULT 0 COMMENT '容量',
  386. `remark` TEXT COMMENT '备注',
  387. `created_by` BIGINT(10) COMMENT '创建者',
  388. `updated_by` BIGINT(10) COMMENT '更新者',
  389. `deleted_by` BIGINT(10) COMMENT '删除者',
  390. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  391. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  392. `deleted_at` DATETIME COMMENT '删除时间',
  393. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  394. PRIMARY KEY (`id`),
  395. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  396. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  397. UNIQUE INDEX `idx_name` (`name`),
  398. INDEX `idx_instance_name` (`instance_name`),
  399. INDEX `idx_deleted_flag` (`deleted_flag`)
  400. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件存储服务表';
  401. -- 如果表存在则删除
  402. DROP TABLE IF EXISTS `object_storage_services`;
  403. -- 创建对象存储服务表
  404. CREATE TABLE `object_storage_services` (
  405. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  406. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  407. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  408. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  409. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  410. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  411. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  412. `user_unit` VARCHAR(120) COMMENT '使用单位',
  413. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  414. `application_time` DATETIME COMMENT '申请时间',
  415. `recovery_time` DATETIME COMMENT '回收时间',
  416. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  417. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  418. `storage_name` VARCHAR(100) NOT NULL COMMENT '名称',
  419. `bucket_size` DECIMAL(10,2) DEFAULT 0.00 COMMENT '存储桶容量',
  420. `remark` TEXT COMMENT '备注',
  421. `created_by` BIGINT(10) COMMENT '创建者',
  422. `updated_by` BIGINT(10) COMMENT '更新者',
  423. `deleted_by` BIGINT(10) COMMENT '删除者',
  424. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  425. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  426. `deleted_at` DATETIME COMMENT '删除时间',
  427. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  428. PRIMARY KEY (`id`),
  429. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  430. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  431. UNIQUE INDEX `idx_storage_name` (`storage_name`),
  432. INDEX `idx_instance_name` (`instance_name`),
  433. INDEX `idx_deleted_flag` (`deleted_flag`)
  434. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='对象存储服务表';
  435. -- 如果表存在则删除
  436. DROP TABLE IF EXISTS `virtual_private_cloud_services`;
  437. -- 创建虚拟私有云服务表
  438. CREATE TABLE `virtual_private_cloud_services` (
  439. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  440. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  441. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  442. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  443. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  444. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  445. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  446. `user_unit` VARCHAR(120) COMMENT '使用单位',
  447. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  448. `application_time` DATETIME COMMENT '申请时间',
  449. `recovery_time` DATETIME COMMENT '回收时间',
  450. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  451. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  452. `subnet_name` VARCHAR(100) NOT NULL COMMENT '网段名称',
  453. `network_id` VARCHAR(100) NOT NULL COMMENT '网络ID',
  454. `subnet_address` VARCHAR(50) NOT NULL COMMENT '网段地址',
  455. `remark` TEXT COMMENT '备注',
  456. `created_by` BIGINT(10) COMMENT '创建者',
  457. `updated_by` BIGINT(10) COMMENT '更新者',
  458. `deleted_by` BIGINT(10) COMMENT '删除者',
  459. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  460. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  461. `deleted_at` DATETIME COMMENT '删除时间',
  462. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  463. PRIMARY KEY (`id`),
  464. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  465. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  466. UNIQUE INDEX `idx_network_id` (`network_id`),
  467. UNIQUE INDEX `idx_subnet_name` (`subnet_name`),
  468. INDEX `idx_instance_name` (`instance_name`),
  469. INDEX `idx_subnet_address` (`subnet_address`),
  470. INDEX `idx_deleted_flag` (`deleted_flag`)
  471. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='虚拟私有云服务表';
  472. -- 如果表存在则删除
  473. DROP TABLE IF EXISTS `security_group_services`;
  474. -- 创建安全组服务表
  475. CREATE TABLE `security_group_services` (
  476. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  477. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  478. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  479. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  480. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  481. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  482. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  483. `user_unit` VARCHAR(120) COMMENT '使用单位',
  484. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  485. `application_time` DATETIME COMMENT '申请时间',
  486. `recovery_time` DATETIME COMMENT '回收时间',
  487. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  488. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  489. `security_group_name` VARCHAR(100) NOT NULL COMMENT '安全组名称',
  490. `security_policy` TEXT COMMENT '安全组策略',
  491. `remark` TEXT COMMENT '备注',
  492. `created_by` BIGINT(10) COMMENT '创建者',
  493. `updated_by` BIGINT(10) COMMENT '更新者',
  494. `deleted_by` BIGINT(10) COMMENT '删除者',
  495. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  496. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  497. `deleted_at` DATETIME COMMENT '删除时间',
  498. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  499. PRIMARY KEY (`id`),
  500. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  501. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  502. UNIQUE INDEX `idx_security_group_name` (`security_group_name`),
  503. INDEX `idx_instance_name` (`instance_name`),
  504. INDEX `idx_deleted_flag` (`deleted_flag`)
  505. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='安全组服务表';
  506. -- 如果表存在则删除
  507. DROP TABLE IF EXISTS `load_balancer_services`;
  508. -- 创建负载均衡服务表
  509. CREATE TABLE `load_balancer_services` (
  510. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  511. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  512. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  513. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  514. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  515. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  516. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  517. `user_unit` VARCHAR(120) COMMENT '使用单位',
  518. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  519. `application_time` DATETIME COMMENT '申请时间',
  520. `recovery_time` DATETIME COMMENT '回收时间',
  521. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  522. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  523. `instance_ids` TEXT COMMENT '实例ID组',
  524. `remark` TEXT COMMENT '备注',
  525. `created_by` BIGINT(10) COMMENT '创建者',
  526. `updated_by` BIGINT(10) COMMENT '更新者',
  527. `deleted_by` BIGINT(10) COMMENT '删除者',
  528. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  529. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  530. `deleted_at` DATETIME COMMENT '删除时间',
  531. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  532. PRIMARY KEY (`id`),
  533. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  534. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  535. INDEX `idx_instance_name` (`instance_name`),
  536. INDEX `idx_deleted_flag` (`deleted_flag`)
  537. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='负载均衡服务表';
  538. -- 如果表存在则删除
  539. DROP TABLE IF EXISTS `elastic_ip_services`;
  540. -- 创建弹性IP服务表
  541. CREATE TABLE `elastic_ip_services` (
  542. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  543. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  544. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  545. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  546. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  547. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  548. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  549. `user_unit` VARCHAR(120) COMMENT '使用单位',
  550. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  551. `application_time` DATETIME COMMENT '申请时间',
  552. `recovery_time` DATETIME COMMENT '回收时间',
  553. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  554. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  555. `ip_type` VARCHAR(20) COMMENT 'IP类型',
  556. `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
  557. `ip_address` VARCHAR(50) NOT NULL COMMENT 'IP地址',
  558. `remark` TEXT COMMENT '备注',
  559. `created_by` BIGINT(10) COMMENT '创建者',
  560. `updated_by` BIGINT(10) COMMENT '更新者',
  561. `deleted_by` BIGINT(10) COMMENT '删除者',
  562. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  563. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  564. `deleted_at` DATETIME COMMENT '删除时间',
  565. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  566. PRIMARY KEY (`id`),
  567. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  568. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  569. UNIQUE INDEX `idx_ip_address` (`ip_address`),
  570. INDEX `idx_instance_name` (`instance_name`),
  571. INDEX `idx_ip_type` (`ip_type`),
  572. INDEX `idx_ip_version` (`ip_version`),
  573. INDEX `idx_deleted_flag` (`deleted_flag`)
  574. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='弹性IP服务表';
  575. -- 如果表存在则删除
  576. DROP TABLE IF EXISTS `vpn_services`;
  577. -- 创建虚拟专用网络VPN服务表
  578. CREATE TABLE `vpn_services` (
  579. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  580. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  581. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  582. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  583. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  584. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  585. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  586. `user_unit` VARCHAR(120) COMMENT '使用单位',
  587. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  588. `application_time` DATETIME COMMENT '申请时间',
  589. `recovery_time` DATETIME COMMENT '回收时间',
  590. `vpn_name` VARCHAR(100) NOT NULL COMMENT 'VPN网络名称',
  591. `ip_subnet` VARCHAR(50) NOT NULL COMMENT 'IP网段',
  592. `vpn_type` VARCHAR(20) NOT NULL COMMENT '开通类型',
  593. `connection_limit` INT(6) DEFAULT 1 COMMENT '开通连接数量',
  594. `remark` TEXT COMMENT '备注',
  595. `created_by` BIGINT(10) COMMENT '创建者',
  596. `updated_by` BIGINT(10) COMMENT '更新者',
  597. `deleted_by` BIGINT(10) COMMENT '删除者',
  598. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  599. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  600. `deleted_at` DATETIME COMMENT '删除时间',
  601. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  602. PRIMARY KEY (`id`),
  603. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  604. UNIQUE INDEX `idx_vpn_name` (`vpn_name`),
  605. INDEX `idx_ip_subnet` (`ip_subnet`),
  606. INDEX `idx_vpn_type` (`vpn_type`),
  607. INDEX `idx_deleted_flag` (`deleted_flag`)
  608. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='虚拟专用网络VPN服务表';
  609. -- 如果表存在则删除
  610. DROP TABLE IF EXISTS `big_data_compute_services`;
  611. -- 创建大数据计算服务表
  612. CREATE TABLE `big_data_compute_services` (
  613. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  614. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  615. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  616. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  617. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  618. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  619. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  620. `user_unit` VARCHAR(120) COMMENT '使用单位',
  621. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  622. `application_time` DATETIME COMMENT '申请时间',
  623. `recovery_time` DATETIME COMMENT '回收时间',
  624. `account_name` VARCHAR(50) NOT NULL COMMENT '开通账号',
  625. `configuration` TEXT COMMENT '开通配置',
  626. `remark` TEXT COMMENT '备注',
  627. `created_by` BIGINT(10) COMMENT '创建者',
  628. `updated_by` BIGINT(10) COMMENT '更新者',
  629. `deleted_by` BIGINT(10) COMMENT '删除者',
  630. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  631. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  632. `deleted_at` DATETIME COMMENT '删除时间',
  633. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  634. PRIMARY KEY (`id`),
  635. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  636. UNIQUE INDEX `idx_account_name` (`account_name`),
  637. INDEX `idx_organization_name` (`organization_name`),
  638. INDEX `idx_system_name` (`system_name`),
  639. INDEX `idx_deleted_flag` (`deleted_flag`)
  640. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='大数据计算服务表';
  641. -- 如果表存在则删除
  642. DROP TABLE IF EXISTS `data_governance_services`;
  643. -- 创建数据治理平台服务表
  644. CREATE TABLE `data_governance_services` (
  645. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  646. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  647. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  648. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  649. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  650. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  651. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  652. `user_unit` VARCHAR(120) COMMENT '使用单位',
  653. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  654. `application_time` DATETIME COMMENT '申请时间',
  655. `recovery_time` DATETIME COMMENT '回收时间',
  656. `account_count` INT(6) DEFAULT 1 COMMENT '开通账号数量',
  657. `service_name` VARCHAR(100) NOT NULL COMMENT '服务名称',
  658. `service_description` TEXT COMMENT '服务说明',
  659. `configuration` TEXT COMMENT '开通配置',
  660. `remark` TEXT COMMENT '备注',
  661. `created_by` BIGINT(10) COMMENT '创建者',
  662. `updated_by` BIGINT(10) COMMENT '更新者',
  663. `deleted_by` BIGINT(10) COMMENT '删除者',
  664. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  665. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  666. `deleted_at` DATETIME COMMENT '删除时间',
  667. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  668. PRIMARY KEY (`id`),
  669. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  670. UNIQUE INDEX `idx_service_name` (`service_name`),
  671. INDEX `idx_organization_name` (`organization_name`),
  672. INDEX `idx_system_name` (`system_name`),
  673. INDEX `idx_deleted_flag` (`deleted_flag`)
  674. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据治理平台服务表';
  675. -- 如果表存在则删除
  676. DROP TABLE IF EXISTS `distributed_cache_services`;
  677. -- 创建分布式缓存服务表
  678. CREATE TABLE `distributed_cache_services` (
  679. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  680. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  681. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  682. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  683. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  684. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  685. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  686. `user_unit` VARCHAR(120) COMMENT '使用单位',
  687. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  688. `application_time` DATETIME COMMENT '申请时间',
  689. `recovery_time` DATETIME COMMENT '回收时间',
  690. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  691. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  692. `deployment_type` VARCHAR(20) COMMENT '开通类型',
  693. `capacity` DECIMAL(10,2) DEFAULT 0.00 COMMENT '开通容量',
  694. `remark` TEXT COMMENT '备注',
  695. `created_by` BIGINT(10) COMMENT '创建者',
  696. `updated_by` BIGINT(10) COMMENT '更新者',
  697. `deleted_by` BIGINT(10) COMMENT '删除者',
  698. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  699. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  700. `deleted_at` DATETIME COMMENT '删除时间',
  701. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  702. PRIMARY KEY (`id`),
  703. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  704. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  705. INDEX `idx_instance_name` (`instance_name`),
  706. INDEX `idx_organization_name` (`organization_name`),
  707. INDEX `idx_system_name` (`system_name`),
  708. INDEX `idx_deleted_flag` (`deleted_flag`)
  709. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='分布式缓存服务表';
  710. -- 如果表存在则删除
  711. DROP TABLE IF EXISTS `relational_database_services`;
  712. -- 创建关系型数据库服务表
  713. CREATE TABLE `relational_database_services` (
  714. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  715. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  716. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  717. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  718. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  719. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  720. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  721. `user_unit` VARCHAR(120) COMMENT '使用单位',
  722. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  723. `application_time` DATETIME COMMENT '申请时间',
  724. `recovery_time` DATETIME COMMENT '回收时间',
  725. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  726. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  727. `vcpu` INT(6) DEFAULT 1 COMMENT 'vCPU',
  728. `memory` INT(6) DEFAULT 1 COMMENT '内存',
  729. `system_disk` INT(6) DEFAULT 40 COMMENT '系统盘',
  730. `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
  731. `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
  732. `ip_address` VARCHAR(50) COMMENT 'IP地址',
  733. `host_status` VARCHAR(20) COMMENT '主机状态',
  734. `db_type` VARCHAR(50) COMMENT '数据库类型',
  735. `remark` TEXT COMMENT '备注',
  736. `created_by` BIGINT(10) COMMENT '创建者',
  737. `updated_by` BIGINT(10) COMMENT '更新者',
  738. `deleted_by` BIGINT(10) COMMENT '删除者',
  739. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  740. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  741. `deleted_at` DATETIME COMMENT '删除时间',
  742. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  743. PRIMARY KEY (`id`),
  744. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  745. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  746. INDEX `idx_instance_name` (`instance_name`),
  747. INDEX `idx_organization_name` (`organization_name`),
  748. INDEX `idx_system_name` (`system_name`),
  749. INDEX `idx_deleted_flag` (`deleted_flag`)
  750. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='关系型数据库服务表';
  751. -- 如果表存在则删除
  752. DROP TABLE IF EXISTS `massive_database_services`;
  753. -- 创建海量数据库表
  754. CREATE TABLE `massive_database_services` (
  755. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  756. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  757. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  758. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  759. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  760. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  761. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  762. `user_unit` VARCHAR(120) COMMENT '使用单位',
  763. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  764. `application_time` DATETIME COMMENT '申请时间',
  765. `recovery_time` DATETIME COMMENT '回收时间',
  766. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  767. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  768. `major_version` INT(4) COMMENT '主版本号',
  769. `minor_version` INT(4) COMMENT '次版本号',
  770. `patch_level` INT(4) COMMENT '补丁级别',
  771. `update_date` DATETIME COMMENT '更新日期',
  772. `engine_type` VARCHAR(50) COMMENT '引擎类型',
  773. `engine_version` VARCHAR(50) COMMENT '引擎版本',
  774. `remark` TEXT COMMENT '备注',
  775. `created_by` BIGINT(10) COMMENT '创建者',
  776. `updated_by` BIGINT(10) COMMENT '更新者',
  777. `deleted_by` BIGINT(10) COMMENT '删除者',
  778. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  779. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  780. `deleted_at` DATETIME COMMENT '删除时间',
  781. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  782. PRIMARY KEY (`id`),
  783. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  784. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  785. INDEX `idx_instance_name` (`instance_name`),
  786. INDEX `idx_organization_name` (`organization_name`),
  787. INDEX `idx_system_name` (`system_name`),
  788. INDEX `idx_deleted_flag` (`deleted_flag`)
  789. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='海量数据库服务表';
  790. -- 如果表存在则删除
  791. DROP TABLE IF EXISTS `dameng_database_services`;
  792. -- 创建达梦数据库表
  793. CREATE TABLE `dameng_database_services` (
  794. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  795. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  796. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  797. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  798. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  799. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  800. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  801. `user_unit` VARCHAR(120) COMMENT '使用单位',
  802. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  803. `application_time` DATETIME COMMENT '申请时间',
  804. `recovery_time` DATETIME COMMENT '回收时间',
  805. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  806. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  807. `major_version` INT(4) COMMENT '主版本号',
  808. `minor_version` INT(4) COMMENT '次版本号',
  809. `patch_level` INT(4) COMMENT '补丁级别',
  810. `update_date` DATETIME COMMENT '更新日期',
  811. `engine_type` VARCHAR(50) COMMENT '引擎类型',
  812. `engine_version` VARCHAR(50) COMMENT '引擎版本',
  813. `remark` TEXT COMMENT '备注',
  814. `created_by` BIGINT(10) COMMENT '创建者',
  815. `updated_by` BIGINT(10) COMMENT '更新者',
  816. `deleted_by` BIGINT(10) COMMENT '删除者',
  817. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  818. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  819. `deleted_at` DATETIME COMMENT '删除时间',
  820. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  821. PRIMARY KEY (`id`),
  822. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  823. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  824. INDEX `idx_instance_name` (`instance_name`),
  825. INDEX `idx_organization_name` (`organization_name`),
  826. INDEX `idx_system_name` (`system_name`),
  827. INDEX `idx_deleted_flag` (`deleted_flag`)
  828. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='达梦数据库服务表';
  829. -- 如果表存在则删除
  830. DROP TABLE IF EXISTS `yashan_database_services`;
  831. -- 创建崖山数据库表
  832. CREATE TABLE `yashan_database_services` (
  833. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  834. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  835. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  836. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  837. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  838. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  839. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  840. `user_unit` VARCHAR(120) COMMENT '使用单位',
  841. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  842. `application_time` DATETIME COMMENT '申请时间',
  843. `recovery_time` DATETIME COMMENT '回收时间',
  844. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  845. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  846. `major_version` INT(4) COMMENT '主版本号',
  847. `minor_version` INT(4) COMMENT '次版本号',
  848. `patch_level` INT(4) COMMENT '补丁级别',
  849. `update_date` DATETIME COMMENT '更新日期',
  850. `engine_type` VARCHAR(50) COMMENT '引擎类型',
  851. `engine_version` VARCHAR(50) COMMENT '引擎版本',
  852. `remark` TEXT COMMENT '备注',
  853. `created_by` BIGINT(10) COMMENT '创建者',
  854. `updated_by` BIGINT(10) COMMENT '更新者',
  855. `deleted_by` BIGINT(10) COMMENT '删除者',
  856. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  857. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  858. `deleted_at` DATETIME COMMENT '删除时间',
  859. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  860. PRIMARY KEY (`id`),
  861. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  862. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  863. INDEX `idx_instance_name` (`instance_name`),
  864. INDEX `idx_organization_name` (`organization_name`),
  865. INDEX `idx_system_name` (`system_name`),
  866. INDEX `idx_deleted_flag` (`deleted_flag`)
  867. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='崖山数据库服务表';
  868. -- 如果表存在则删除
  869. DROP TABLE IF EXISTS `microservices`;
  870. -- 创建微服务表
  871. CREATE TABLE `microservices` (
  872. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  873. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  874. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  875. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  876. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  877. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  878. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  879. `user_unit` VARCHAR(120) COMMENT '使用单位',
  880. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  881. `application_time` DATETIME COMMENT '申请时间',
  882. `recovery_time` DATETIME COMMENT '回收时间',
  883. `container_id` VARCHAR(100) NOT NULL COMMENT '容器ID',
  884. `service_name` VARCHAR(100) NOT NULL COMMENT '微服务名称',
  885. `configuration` TEXT COMMENT '配置',
  886. `remark` TEXT COMMENT '备注',
  887. `created_by` BIGINT(10) COMMENT '创建者',
  888. `updated_by` BIGINT(10) COMMENT '更新者',
  889. `deleted_by` BIGINT(10) COMMENT '删除者',
  890. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  891. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  892. `deleted_at` DATETIME COMMENT '删除时间',
  893. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  894. PRIMARY KEY (`id`),
  895. UNIQUE INDEX `idx_container_id` (`container_id`),
  896. UNIQUE INDEX `idx_service_name` (`service_name`),
  897. INDEX `idx_ticket_number` (`ticket_number`),
  898. INDEX `idx_organization_name` (`organization_name`),
  899. INDEX `idx_system_name` (`system_name`),
  900. INDEX `idx_deleted_flag` (`deleted_flag`)
  901. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微服务表';
  902. -- 如果表存在则删除
  903. DROP TABLE IF EXISTS `container_services`;
  904. -- 创建容器服务表
  905. CREATE TABLE `container_services` (
  906. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  907. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  908. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  909. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  910. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  911. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  912. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  913. `user_unit` VARCHAR(120) COMMENT '使用单位',
  914. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  915. `application_time` DATETIME COMMENT '申请时间',
  916. `recovery_time` DATETIME COMMENT '回收时间',
  917. `container_id` VARCHAR(100) NOT NULL COMMENT '容器ID',
  918. `container_name` VARCHAR(100) NOT NULL COMMENT '容器名称',
  919. `configuration` TEXT COMMENT '配置',
  920. `remark` TEXT COMMENT '备注',
  921. `created_by` BIGINT(10) COMMENT '创建者',
  922. `updated_by` BIGINT(10) COMMENT '更新者',
  923. `deleted_by` BIGINT(10) COMMENT '删除者',
  924. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  925. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  926. `deleted_at` DATETIME COMMENT '删除时间',
  927. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  928. PRIMARY KEY (`id`),
  929. UNIQUE INDEX `idx_container_id` (`container_id`),
  930. UNIQUE INDEX `idx_container_name` (`container_name`),
  931. INDEX `idx_ticket_number` (`ticket_number`),
  932. INDEX `idx_organization_name` (`organization_name`),
  933. INDEX `idx_system_name` (`system_name`),
  934. INDEX `idx_deleted_flag` (`deleted_flag`)
  935. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='容器服务表';
  936. -- 如果表存在则删除
  937. DROP TABLE IF EXISTS `ams_application_grid_services`;
  938. -- 创建AMS应用网格服务表
  939. CREATE TABLE `ams_application_grid_services` (
  940. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  941. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  942. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  943. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  944. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  945. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  946. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  947. `user_unit` VARCHAR(120) COMMENT '使用单位',
  948. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  949. `application_time` DATETIME COMMENT '申请时间',
  950. `recovery_time` DATETIME COMMENT '回收时间',
  951. `business_name` VARCHAR(120) COMMENT '业务名称',
  952. `container_ids` TEXT COMMENT '容器ID组',
  953. `configuration` TEXT COMMENT '配置',
  954. `remark` TEXT COMMENT '备注',
  955. `created_by` BIGINT(10) COMMENT '创建者',
  956. `updated_by` BIGINT(10) COMMENT '更新者',
  957. `deleted_by` BIGINT(10) COMMENT '删除者',
  958. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  959. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  960. `deleted_at` DATETIME COMMENT '删除时间',
  961. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  962. PRIMARY KEY (`id`),
  963. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  964. INDEX `idx_business_name` (`business_name`),
  965. INDEX `idx_organization_name` (`organization_name`),
  966. INDEX `idx_system_name` (`system_name`),
  967. INDEX `idx_deleted_flag` (`deleted_flag`)
  968. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='AMS应用网格服务表';
  969. -- 如果表存在则删除
  970. DROP TABLE IF EXISTS `application_data_integration_services`;
  971. -- 创建应用与数据集成平台服务表
  972. CREATE TABLE `application_data_integration_services` (
  973. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  974. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  975. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  976. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  977. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  978. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  979. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  980. `user_unit` VARCHAR(120) COMMENT '使用单位',
  981. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  982. `application_time` DATETIME COMMENT '申请时间',
  983. `recovery_time` DATETIME COMMENT '回收时间',
  984. `package_type` VARCHAR(20) COMMENT '开通类型',
  985. `connection_count` INT(6) DEFAULT 1 COMMENT '开通数量',
  986. `remark` TEXT COMMENT '备注',
  987. `created_by` BIGINT(10) COMMENT '创建者',
  988. `updated_by` BIGINT(10) COMMENT '更新者',
  989. `deleted_by` BIGINT(10) COMMENT '删除者',
  990. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  991. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  992. `deleted_at` DATETIME COMMENT '删除时间',
  993. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  994. PRIMARY KEY (`id`),
  995. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  996. INDEX `idx_package_type` (`package_type`),
  997. INDEX `idx_organization_name` (`organization_name`),
  998. INDEX `idx_system_name` (`system_name`),
  999. INDEX `idx_deleted_flag` (`deleted_flag`)
  1000. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用与数据集成平台服务表';
  1001. -- 如果表存在则删除
  1002. DROP TABLE IF EXISTS `apm_application_performance_management_services`;
  1003. -- 创建APM应用性能管理服务表
  1004. CREATE TABLE `apm_application_performance_management_services` (
  1005. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1006. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1007. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1008. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1009. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1010. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1011. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1012. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1013. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1014. `application_time` DATETIME COMMENT '申请时间',
  1015. `recovery_time` DATETIME COMMENT '回收时间',
  1016. `probe_count` INT(6) DEFAULT 1 COMMENT '开通数量',
  1017. `remark` TEXT COMMENT '备注',
  1018. `created_by` BIGINT(10) COMMENT '创建者',
  1019. `updated_by` BIGINT(10) COMMENT '更新者',
  1020. `deleted_by` BIGINT(10) COMMENT '删除者',
  1021. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1022. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1023. `deleted_at` DATETIME COMMENT '删除时间',
  1024. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1025. PRIMARY KEY (`id`),
  1026. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1027. INDEX `idx_organization_name` (`organization_name`),
  1028. INDEX `idx_system_name` (`system_name`),
  1029. INDEX `idx_deleted_flag` (`deleted_flag`)
  1030. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='APM应用性能管理服务表';
  1031. -- 如果表存在则删除
  1032. DROP TABLE IF EXISTS `kunpeng_desktop_cloud_storage`;
  1033. -- 创建鲲鹏桌面云云硬盘存储表
  1034. CREATE TABLE `kunpeng_desktop_cloud_storage` (
  1035. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1036. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1037. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1038. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1039. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1040. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1041. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1042. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1043. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1044. `application_time` DATETIME COMMENT '申请时间',
  1045. `recovery_time` DATETIME COMMENT '回收时间',
  1046. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  1047. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  1048. `disk_type` VARCHAR(50) COMMENT '磁盘类型',
  1049. `disk_size` INT(6) COMMENT '磁盘大小',
  1050. `remark` TEXT COMMENT '备注',
  1051. `created_by` BIGINT(10) COMMENT '创建者',
  1052. `updated_by` BIGINT(10) COMMENT '更新者',
  1053. `deleted_by` BIGINT(10) COMMENT '删除者',
  1054. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1055. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1056. `deleted_at` DATETIME COMMENT '删除时间',
  1057. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1058. PRIMARY KEY (`id`),
  1059. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  1060. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1061. INDEX `idx_instance_name` (`instance_name`),
  1062. INDEX `idx_organization_name` (`organization_name`),
  1063. INDEX `idx_system_name` (`system_name`),
  1064. INDEX `idx_deleted_flag` (`deleted_flag`)
  1065. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='鲲鹏桌面云云硬盘存储表';
  1066. -- 如果表存在则删除
  1067. DROP TABLE IF EXISTS `kunpeng_desktop_cloud_hosts`;
  1068. -- 创建鲲鹏桌面云主机表
  1069. CREATE TABLE `kunpeng_desktop_cloud_hosts` (
  1070. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1071. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1072. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1073. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1074. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1075. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1076. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1077. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1078. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1079. `application_time` DATETIME COMMENT '申请时间',
  1080. `recovery_time` DATETIME COMMENT '回收时间',
  1081. `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
  1082. `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
  1083. `vcpu` INT(6) COMMENT 'vCPU',
  1084. `memory` INT(6) COMMENT '内存',
  1085. `system_disk` INT(6) COMMENT '系统盘',
  1086. `system_disk_type` VARCHAR(20) COMMENT '系统盘类型',
  1087. `os_type` VARCHAR(50) COMMENT '操作系统',
  1088. `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
  1089. `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
  1090. `ip_address` VARCHAR(50) COMMENT 'IP地址',
  1091. `instance_status` VARCHAR(20) COMMENT '云主机状态',
  1092. `remark` TEXT COMMENT '备注',
  1093. `created_by` BIGINT(10) COMMENT '创建者',
  1094. `updated_by` BIGINT(10) COMMENT '更新者',
  1095. `deleted_by` BIGINT(10) COMMENT '删除者',
  1096. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1097. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1098. `deleted_at` DATETIME COMMENT '删除时间',
  1099. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1100. PRIMARY KEY (`id`),
  1101. UNIQUE INDEX `idx_instance_id` (`instance_id`),
  1102. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1103. INDEX `idx_instance_name` (`instance_name`),
  1104. INDEX `idx_organization_name` (`organization_name`),
  1105. INDEX `idx_system_name` (`system_name`),
  1106. INDEX `idx_deleted_flag` (`deleted_flag`)
  1107. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='鲲鹏桌面云主机表';
  1108. -- 如果表存在则删除
  1109. DROP TABLE IF EXISTS `security_services`;
  1110. -- 创建安全服务表
  1111. CREATE TABLE `security_services` (
  1112. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1113. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1114. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1115. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1116. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1117. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1118. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1119. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1120. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1121. `application_time` DATETIME COMMENT '申请时间',
  1122. `recovery_time` DATETIME COMMENT '回收时间',
  1123. `security_type` VARCHAR(50) COMMENT '开通类型',
  1124. `service_count` INT(6) DEFAULT 1 COMMENT '开通数量',
  1125. `configuration` TEXT COMMENT '开通配置',
  1126. `remark` TEXT COMMENT '备注',
  1127. `created_by` BIGINT(10) COMMENT '创建者',
  1128. `updated_by` BIGINT(10) COMMENT '更新者',
  1129. `deleted_by` BIGINT(10) COMMENT '删除者',
  1130. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1131. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1132. `deleted_at` DATETIME COMMENT '删除时间',
  1133. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1134. PRIMARY KEY (`id`),
  1135. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1136. INDEX `idx_security_type` (`security_type`),
  1137. INDEX `idx_organization_name` (`organization_name`),
  1138. INDEX `idx_system_name` (`system_name`),
  1139. INDEX `idx_deleted_flag` (`deleted_flag`)
  1140. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='安全服务表';
  1141. -- 如果表存在则删除
  1142. DROP TABLE IF EXISTS `disaster_recovery_services`;
  1143. -- 创建灾备服务表
  1144. CREATE TABLE `disaster_recovery_services` (
  1145. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1146. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1147. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1148. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1149. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1150. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1151. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1152. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1153. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1154. `application_time` DATETIME COMMENT '申请时间',
  1155. `recovery_time` DATETIME COMMENT '回收时间',
  1156. `backup_system_name` VARCHAR(120) COMMENT '备份系统名称',
  1157. `backup_capacity` INT(6) COMMENT '备份容量',
  1158. `remark` TEXT COMMENT '备注',
  1159. `created_by` BIGINT(10) COMMENT '创建者',
  1160. `updated_by` BIGINT(10) COMMENT '更新者',
  1161. `deleted_by` BIGINT(10) COMMENT '删除者',
  1162. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1163. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1164. `deleted_at` DATETIME COMMENT '删除时间',
  1165. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1166. PRIMARY KEY (`id`),
  1167. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1168. INDEX `idx_backup_system_name` (`backup_system_name`),
  1169. INDEX `idx_organization_name` (`organization_name`),
  1170. INDEX `idx_system_name` (`system_name`),
  1171. INDEX `idx_deleted_flag` (`deleted_flag`)
  1172. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='灾备服务表';
  1173. -- 如果表存在则删除
  1174. DROP TABLE IF EXISTS `e_government_network`;
  1175. -- 创建电子政务网表
  1176. CREATE TABLE `e_government_network` (
  1177. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1178. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1179. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1180. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1181. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1182. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1183. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1184. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1185. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1186. `application_time` DATETIME COMMENT '申请时间',
  1187. `recovery_time` DATETIME COMMENT '回收时间',
  1188. `business_type` VARCHAR(20) COMMENT '业务类型',
  1189. `ip_type` VARCHAR(20) COMMENT 'IP地址类型',
  1190. `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
  1191. `ip_address` VARCHAR(50) COMMENT 'IP地址',
  1192. `subnet_mask` VARCHAR(50) COMMENT '子网掩码',
  1193. `gateway` VARCHAR(50) COMMENT '网关',
  1194. `remark` TEXT COMMENT '备注',
  1195. `created_by` BIGINT(10) COMMENT '创建者',
  1196. `updated_by` BIGINT(10) COMMENT '更新者',
  1197. `deleted_by` BIGINT(10) COMMENT '删除者',
  1198. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1199. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1200. `deleted_at` DATETIME COMMENT '删除时间',
  1201. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1202. PRIMARY KEY (`id`),
  1203. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1204. INDEX `idx_business_type` (`business_type`),
  1205. INDEX `idx_organization_name` (`organization_name`),
  1206. INDEX `idx_system_name` (`system_name`),
  1207. INDEX `idx_deleted_flag` (`deleted_flag`)
  1208. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='电子政务网表';
  1209. -- 如果表存在则删除
  1210. DROP TABLE IF EXISTS `domain_resolution`;
  1211. -- 创建域名解析表
  1212. CREATE TABLE `domain_resolution` (
  1213. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1214. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1215. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1216. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1217. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1218. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1219. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1220. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1221. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1222. `application_time` DATETIME COMMENT '申请时间',
  1223. `recovery_time` DATETIME COMMENT '回收时间',
  1224. `network_type` VARCHAR(50) COMMENT '接入网络',
  1225. `ip_address` VARCHAR(50) COMMENT 'IP地址',
  1226. `domain_name` VARCHAR(100) COMMENT '域名地址',
  1227. `remark` TEXT COMMENT '备注',
  1228. `created_by` BIGINT(10) COMMENT '创建者',
  1229. `updated_by` BIGINT(10) COMMENT '更新者',
  1230. `deleted_by` BIGINT(10) COMMENT '删除者',
  1231. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1232. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1233. `deleted_at` DATETIME COMMENT '删除时间',
  1234. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1235. PRIMARY KEY (`id`),
  1236. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1237. INDEX `idx_domain_name` (`domain_name`),
  1238. INDEX `idx_organization_name` (`organization_name`),
  1239. INDEX `idx_system_name` (`system_name`),
  1240. INDEX `idx_deleted_flag` (`deleted_flag`)
  1241. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='域名解析表';
  1242. -- 如果表存在则删除
  1243. DROP TABLE IF EXISTS `port_opening`;
  1244. -- 创建端口开放表
  1245. CREATE TABLE `port_opening` (
  1246. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1247. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1248. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1249. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1250. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1251. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1252. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1253. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1254. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1255. `application_time` DATETIME COMMENT '申请时间',
  1256. `recovery_time` DATETIME COMMENT '回收时间',
  1257. `network_type` VARCHAR(50) COMMENT '接入网络',
  1258. `source_address` VARCHAR(100) COMMENT '源地址',
  1259. `destination_address` VARCHAR(100) COMMENT '目的地址',
  1260. `port_type` VARCHAR(20) COMMENT '端口类型',
  1261. `port_number` VARCHAR(20) COMMENT '端口号',
  1262. `port_usage` VARCHAR(200) COMMENT '端口用途',
  1263. `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
  1264. `ip_address` VARCHAR(50) COMMENT 'IP地址',
  1265. `rdp_service_opened` VARCHAR(50) COMMENT 'RDP服务开通',
  1266. `remark` TEXT COMMENT '备注',
  1267. `created_by` BIGINT(10) COMMENT '创建者',
  1268. `updated_by` BIGINT(10) COMMENT '更新者',
  1269. `deleted_by` BIGINT(10) COMMENT '删除者',
  1270. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1271. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1272. `deleted_at` DATETIME COMMENT '删除时间',
  1273. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1274. PRIMARY KEY (`id`),
  1275. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1276. INDEX `idx_port_number` (`port_number`),
  1277. INDEX `idx_organization_name` (`organization_name`),
  1278. INDEX `idx_system_name` (`system_name`),
  1279. INDEX `idx_deleted_flag` (`deleted_flag`)
  1280. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='端口开放表';
  1281. -- 如果表存在则删除
  1282. DROP TABLE IF EXISTS `government_extranet_access`;
  1283. -- 创建政务外网接入表
  1284. CREATE TABLE `government_extranet_access` (
  1285. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1286. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1287. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1288. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1289. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1290. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1291. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1292. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1293. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1294. `application_time` DATETIME COMMENT '申请时间',
  1295. `recovery_time` DATETIME COMMENT '回收时间',
  1296. `access_address` VARCHAR(100) COMMENT '接入地址',
  1297. `network_level` VARCHAR(50) COMMENT '接入网络类型',
  1298. `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
  1299. `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
  1300. `ip_address` VARCHAR(50) COMMENT 'IP地址',
  1301. `application_reason` VARCHAR(200) COMMENT '申请需求说明',
  1302. `remark` TEXT COMMENT '备注',
  1303. `created_by` BIGINT(10) COMMENT '创建者',
  1304. `updated_by` BIGINT(10) COMMENT '更新者',
  1305. `deleted_by` BIGINT(10) COMMENT '删除者',
  1306. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1307. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1308. `deleted_at` DATETIME COMMENT '删除时间',
  1309. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1310. PRIMARY KEY (`id`),
  1311. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1312. INDEX `idx_access_address` (`access_address`),
  1313. INDEX `idx_organization_name` (`organization_name`),
  1314. INDEX `idx_system_name` (`system_name`),
  1315. INDEX `idx_deleted_flag` (`deleted_flag`)
  1316. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='政务外网接入表';
  1317. -- 如果表存在则删除
  1318. DROP TABLE IF EXISTS `government_cloud_dedicated_line`;
  1319. -- 创建政务云专线表
  1320. CREATE TABLE `government_cloud_dedicated_line` (
  1321. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1322. `ticket_number` VARCHAR(40) COMMENT '工单编号',
  1323. `organization_name` VARCHAR(120) COMMENT '申请单位名称',
  1324. `system_manager` VARCHAR(20) COMMENT '申请联系人',
  1325. `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
  1326. `technical_contact` VARCHAR(20) COMMENT '技术联系人',
  1327. `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
  1328. `user_unit` VARCHAR(120) COMMENT '使用单位',
  1329. `system_name` VARCHAR(120) COMMENT '信息系统名称',
  1330. `application_time` DATETIME COMMENT '申请时间',
  1331. `recovery_time` DATETIME COMMENT '回收时间',
  1332. `source_address` VARCHAR(50) COMMENT '源地址',
  1333. `destination_address` VARCHAR(50) COMMENT '目的地址',
  1334. `cloud_type` VARCHAR(50) COMMENT '接入云类型',
  1335. `line_name` VARCHAR(100) COMMENT '线路名称',
  1336. `start_node` VARCHAR(100) COMMENT '起始节点',
  1337. `end_node` VARCHAR(100) COMMENT '终止节点',
  1338. `route_info` TEXT COMMENT '路由信息',
  1339. `application_reason` VARCHAR(200) COMMENT '申请需求说明',
  1340. `dedicated_line_side_business_ip` VARCHAR(100) COMMENT '专线侧业务IP',
  1341. `remark` TEXT COMMENT '备注',
  1342. `created_by` BIGINT(10) COMMENT '创建者',
  1343. `updated_by` BIGINT(10) COMMENT '更新者',
  1344. `deleted_by` BIGINT(10) COMMENT '删除者',
  1345. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1346. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1347. `deleted_at` DATETIME COMMENT '删除时间',
  1348. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1349. PRIMARY KEY (`id`),
  1350. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1351. INDEX `idx_line_name` (`line_name`),
  1352. INDEX `idx_organization_name` (`organization_name`),
  1353. INDEX `idx_system_name` (`system_name`),
  1354. INDEX `idx_deleted_flag` (`deleted_flag`)
  1355. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='政务云专线表';
  1356. -- 如果表存在则删除
  1357. DROP TABLE IF EXISTS `ip_address_resources`;
  1358. -- 创建IP地址资源表
  1359. CREATE TABLE `ip_address_resources` (
  1360. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1361. `ticket_number` VARCHAR(40) NOT NULL COMMENT '工单编号',
  1362. `organization_name` VARCHAR(120) NOT NULL COMMENT '单位名称',
  1363. `system_manager` VARCHAR(20) NOT NULL COMMENT '联系人',
  1364. `system_manager_phone` VARCHAR(40) NOT NULL COMMENT '联系电话',
  1365. `technical_manager` VARCHAR(20) NOT NULL COMMENT '技术负责人',
  1366. `technical_manager_phone` VARCHAR(40) NOT NULL COMMENT '技术负责人电话',
  1367. `system_name` VARCHAR(120) NOT NULL COMMENT '信息系统名称',
  1368. `used_data_center` VARCHAR(50) NOT NULL COMMENT '使用数据中心',
  1369. `ip_type` VARCHAR(20) NOT NULL COMMENT 'IP地址类型',
  1370. `ip_version` VARCHAR(10) NOT NULL COMMENT 'IPV4/IPV6',
  1371. `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
  1372. `device_sn` VARCHAR(50) NOT NULL COMMENT '设备序列号',
  1373. `ip_address` VARCHAR(50) NOT NULL COMMENT 'IP地址',
  1374. `subnet_mask` VARCHAR(50) NOT NULL COMMENT '子网掩码',
  1375. `gateway` VARCHAR(50) NOT NULL COMMENT '网关',
  1376. `tcp_port` VARCHAR(50) NOT NULL COMMENT 'TCP协议端口号',
  1377. `udp_port` VARCHAR(50) NOT NULL COMMENT 'UDP协议端口号',
  1378. `city_network` VARCHAR(5) NOT NULL COMMENT '接通市网',
  1379. `province_network` VARCHAR(5) NOT NULL COMMENT '接通省网',
  1380. `national_network` VARCHAR(5) NOT NULL COMMENT '接通国家网',
  1381. `status` VARCHAR(20) NOT NULL COMMENT '状态',
  1382. `remark` TEXT COMMENT '备注',
  1383. `created_by` BIGINT(10) NOT NULL COMMENT '创建者',
  1384. `updated_by` BIGINT(10) NOT NULL COMMENT '更新者',
  1385. `deleted_by` BIGINT(10) NOT NULL COMMENT '删除者',
  1386. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1387. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1388. `deleted_at` DATETIME COMMENT '删除时间',
  1389. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1390. PRIMARY KEY (`id`),
  1391. UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
  1392. INDEX `idx_ip_address` (`ip_address`),
  1393. INDEX `idx_organization_name` (`organization_name`),
  1394. INDEX `idx_system_name` (`system_name`),
  1395. INDEX `idx_deleted_flag` (`deleted_flag`)
  1396. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='IP地址资源表';
  1397. -- 如果表存在则删除
  1398. DROP TABLE IF EXISTS `alarm_info`;
  1399. -- 创建告警信息表
  1400. CREATE TABLE `alarm_info` (
  1401. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1402. `source` VARCHAR(4) COMMENT '告警来源',
  1403. `ip_address` VARCHAR(50) COMMENT 'IP',
  1404. `alarm_name` VARCHAR(100) COMMENT '告警名称',
  1405. `alarm_severity` INT(4) COMMENT '告警级别',
  1406. `alarm_time` DATETIME COMMENT '告警时间',
  1407. `alarm_content` TEXT COMMENT '告警内容',
  1408. `alarm_status` TINYINT(1) COMMENT '告警状态',
  1409. `remark` TEXT COMMENT '备注',
  1410. `created_by` BIGINT(10) COMMENT '创建者',
  1411. `updated_by` BIGINT(10) COMMENT '更新者',
  1412. `deleted_by` BIGINT(10) COMMENT '删除者',
  1413. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1414. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1415. `deleted_at` DATETIME COMMENT '删除时间',
  1416. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1417. PRIMARY KEY (`id`),
  1418. INDEX `idx_ip_address` (`ip_address`),
  1419. INDEX `idx_alarm_name` (`alarm_name`),
  1420. INDEX `idx_alarm_time` (`alarm_time`),
  1421. INDEX `idx_deleted_flag` (`deleted_flag`)
  1422. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='告警信息表';
  1423. -- 如果表存在则删除
  1424. DROP TABLE IF EXISTS `dict_type`;
  1425. -- 创建字典类型表
  1426. CREATE TABLE `dict_type` (
  1427. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1428. `dict_name` VARCHAR(100) NOT NULL COMMENT '字典名称',
  1429. `dict_type` VARCHAR(100) NOT NULL COMMENT '字典类型',
  1430. `status` TINYINT(1) NOT NULL COMMENT '字典状态',
  1431. `remark` VARCHAR(200) COMMENT '备注',
  1432. `created_by` BIGINT(10) NOT NULL COMMENT '创建者',
  1433. `updated_by` BIGINT(10) NOT NULL COMMENT '更新者',
  1434. `deleted_by` BIGINT(10) NOT NULL COMMENT '删除者',
  1435. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1436. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1437. `deleted_at` DATETIME COMMENT '删除时间',
  1438. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1439. PRIMARY KEY (`id`),
  1440. UNIQUE INDEX `idx_dict_name` (`dict_name`),
  1441. INDEX `idx_dict_type` (`dict_type`),
  1442. INDEX `idx_status` (`status`),
  1443. INDEX `idx_deleted_flag` (`deleted_flag`)
  1444. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='字典类型表';
  1445. -- 如果表存在则删除
  1446. DROP TABLE IF EXISTS `dict_data`;
  1447. -- 创建字典数据表
  1448. CREATE TABLE `dict_data` (
  1449. `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
  1450. `dict_type` VARCHAR(100) NOT NULL COMMENT '字典类型',
  1451. `dict_label` VARCHAR(100) NOT NULL COMMENT '字典标签',
  1452. `dict_value` VARCHAR(100) NOT NULL COMMENT '字典键值',
  1453. `status` TINYINT(1) NOT NULL COMMENT '状态',
  1454. `is_default` CHAR(1) NOT NULL COMMENT '是否默认',
  1455. `sort` INT(4) NOT NULL COMMENT '排序',
  1456. `remark` VARCHAR(200) COMMENT '备注',
  1457. `created_by` BIGINT(10) NOT NULL COMMENT '创建者',
  1458. `updated_by` BIGINT(10) NOT NULL COMMENT '更新者',
  1459. `deleted_by` BIGINT(10) NOT NULL COMMENT '删除者',
  1460. `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  1461. `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  1462. `deleted_at` DATETIME COMMENT '删除时间',
  1463. `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
  1464. PRIMARY KEY (`id`),
  1465. INDEX `idx_dict_type` (`dict_type`),
  1466. INDEX `idx_dict_label` (`dict_label`),
  1467. INDEX `idx_dict_value` (`dict_value`),
  1468. INDEX `idx_status` (`status`),
  1469. INDEX `idx_deleted_flag` (`deleted_flag`)
  1470. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='字典数据表';