1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513 |
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `data_centers`;
- -- 创建数据中心表
- CREATE TABLE `data_centers` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `data_center` VARCHAR(50) NOT NULL COMMENT '数据中心',
- `name` VARCHAR(50) NOT NULL COMMENT '名称',
- `address` VARCHAR(255) COMMENT '地理位置',
- `area` DECIMAL(10,2) COMMENT '建筑面积',
- `rooms` INT(10) COMMENT '机房数量',
- `double_power` BIT(1) DEFAULT 0 COMMENT '双市电输入',
- `admin` VARCHAR(40) COMMENT '联系人',
- `moible` VARCHAR(40) COMMENT '联系电话',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- INDEX `idx_data_center` (`data_center`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据中心表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `computer_rooms`;
- -- 创建机房表
- CREATE TABLE `computer_rooms` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `park_id` BIGINT(10) NOT NULL COMMENT '所属数据中心机房',
- `build` VARCHAR(50) COMMENT '楼栋',
- `floor` VARCHAR(10) COMMENT '楼层',
- `name` VARCHAR(100) NOT NULL COMMENT '机房名称',
- `area` DECIMAL(10,2) COMMENT '机房面积',
- `cabinets` BIGINT(10) DEFAULT 0 COMMENT '机柜数量',
- `admin` VARCHAR(255) COMMENT '管理员',
- `moible` VARCHAR(40) COMMENT '联系电话',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- INDEX `idx_park_id` (`park_id`),
- INDEX `idx_name` (`name`),
- INDEX `idx_deleted_flag` (`deleted_flag`),
- CONSTRAINT `fk_computer_rooms_park` FOREIGN KEY (`park_id`) REFERENCES `data_centers` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机房表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `cabinets`;
- -- 创建机柜信息表
- CREATE TABLE `cabinets` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `room_id` BIGINT(10) NOT NULL COMMENT '所属机房',
- `passageway` VARCHAR(50) COMMENT '所属通道',
- `cabinet_id` VARCHAR(50) NOT NULL COMMENT '机柜ID',
- `cabinet_name` VARCHAR(100) NOT NULL COMMENT '机柜名称',
- `power` DECIMAL(10,2) DEFAULT 0.00 COMMENT '设计功率',
- `capacity` BIGINT(10) DEFAULT 0 COMMENT '机柜容量',
- `double_power` BIT(1) DEFAULT 0 COMMENT '单/双电路',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_cabinet_id` (`cabinet_id`),
- INDEX `idx_room_id` (`room_id`),
- INDEX `idx_cabinet_name` (`cabinet_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`),
- CONSTRAINT `fk_cabinets_room` FOREIGN KEY (`room_id`) REFERENCES `computer_rooms` (`id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机柜信息表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `devices`;
- -- 创建设备基本信息表
- CREATE TABLE `devices` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `access_network` VARCHAR(20) COMMENT '接入网络',
- `sn` VARCHAR(50) COMMENT '设备序列号',
- `device_name` VARCHAR(50) NOT NULL COMMENT '设备名称',
- `manufacturer` VARCHAR(100) COMMENT '厂商',
- `device_model` VARCHAR(50) COMMENT '设备型号',
- `device_type` VARCHAR(20) COMMENT '设备类型',
- `power` INT(10) DEFAULT 0 COMMENT '额定功率',
- `u_height` INT(3) DEFAULT 1 COMMENT '设备高度',
- `u_begin` INT(3) COMMENT '起始U位',
- `u_end` INT(2) COMMENT '结束U位',
- `cabinet` VARCHAR(100) COMMENT '所属机柜',
- `double_power` VARCHAR(20) COMMENT '电源模块',
- `hardware_config` TEXT COMMENT '硬件配置参数',
- `application_desc` TEXT COMMENT '应用描述',
- `status` VARCHAR(20) DEFAULT 'inactive' COMMENT '状态',
- `run_status` VARCHAR(20) DEFAULT 'stopped' COMMENT '运行状态',
- `manage_type` VARCHAR(20) COMMENT '管理类型',
- `ip_type` VARCHAR(10) COMMENT '地址类型',
- `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
- `ip_address` VARCHAR(15) COMMENT 'IP地址',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_sn` (`sn`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_device_name` (`device_name`),
- INDEX `idx_cabinet` (`cabinet`),
- INDEX `idx_status` (`status`),
- INDEX `idx_ip_address` (`ip_address`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='设备基本信息表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `cloud_instances`;
- -- 创建云主机服务表
- CREATE TABLE `cloud_instances` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `cloud_processor_architecture` VARCHAR(30) COMMENT '云环境',
- `instance_type` VARCHAR(20) COMMENT '云主机类型',
- `operating_system` VARCHAR(20) COMMENT '操作系统',
- `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
- `vcpu` INT(6) DEFAULT 1 COMMENT 'vCPU',
- `memory` INT(6) DEFAULT 1 COMMENT '内存',
- `system_disk` INT(6) DEFAULT 40 COMMENT '系统盘',
- `system_disk_type` VARCHAR(20) COMMENT '系统盘类型',
- `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
- `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
- `ip_address` VARCHAR(30) COMMENT 'IP地址',
- `host_status` INT(2) DEFAULT 0 COMMENT '主机状态',
- `remark` VARCHAR(255) COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_ip_address` (`ip_address`),
- INDEX `idx_host_status` (`host_status`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='云主机服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `ai_computing_instances`;
- -- 创建AI算力服务表
- CREATE TABLE `ai_computing_instances` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
- `computing_type` VARCHAR(50) COMMENT '算力卡类型',
- `configuration_params` TEXT COMMENT '配置参数',
- `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
- `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
- `ip_address` VARCHAR(30) COMMENT 'IP地址',
- `host_status` INT(2) DEFAULT 0 COMMENT '主机状态',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_computing_type` (`computing_type`),
- INDEX `idx_ip_address` (`ip_address`),
- INDEX `idx_host_status` (`host_status`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='AI算力服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `bare_metal_instances`;
- -- 创建定制裸金属服务表
- CREATE TABLE `bare_metal_instances` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `cloud_processor_architecture` VARCHAR(30) COMMENT '云环境',
- `operating_system` VARCHAR(20) COMMENT '操作系统',
- `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
- `device_sn` VARCHAR(50) COMMENT '设备序列号',
- `cpu_cores` INT(4) DEFAULT 1 COMMENT 'CPU核心数',
- `memory` INT(6) DEFAULT 1 COMMENT '内存',
- `system_disk` INT(6) DEFAULT 40 COMMENT '系统盘',
- `system_disk_type` VARCHAR(20) COMMENT '系统盘类型',
- `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
- `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
- `ip_address` VARCHAR(30) COMMENT 'IP地址',
- `host_status` INT(2) DEFAULT 0 COMMENT '主机状态',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_device_sn` (`device_sn`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_ip_address` (`ip_address`),
- INDEX `idx_host_status` (`host_status`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='定制裸金属服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `image_services`;
- -- 创建镜像服务表
- CREATE TABLE `image_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
- `image_id` VARCHAR(100) NOT NULL COMMENT '镜像ID',
- `image_name` VARCHAR(100) NOT NULL COMMENT '镜像名称',
- `mirror_type` VARCHAR(100) COMMENT '镜像类型',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_image_id` (`image_id`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_image_name` (`image_name`),
- INDEX `idx_mirror_type` (`mirror_type`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='镜像服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `elastic_scaling_services`;
- -- 创建弹性伸缩服务表
- CREATE TABLE `elastic_scaling_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `policy` VARCHAR(50) COMMENT '策略',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_policy` (`policy`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='弹性伸缩服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `cloud_disk_services`;
- -- 创建云硬盘存储服务表
- CREATE TABLE `cloud_disk_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
- `disk_id` VARCHAR(40) NOT NULL COMMENT '磁盘ID',
- `disk_type` VARCHAR(20) COMMENT '存储类型',
- `disk_size` INT(6) DEFAULT 0 COMMENT '存储容量',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_disk_id` (`disk_id`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_disk_type` (`disk_type`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='云硬盘存储服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `file_storage_services`;
- -- 创建文件存储服务表
- CREATE TABLE `file_storage_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(40) NOT NULL COMMENT '实例名称',
- `name` VARCHAR(100) NOT NULL COMMENT '名称',
- `capacity` INT(6) DEFAULT 0 COMMENT '容量',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_name` (`name`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件存储服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `object_storage_services`;
- -- 创建对象存储服务表
- CREATE TABLE `object_storage_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `storage_name` VARCHAR(100) NOT NULL COMMENT '名称',
- `bucket_size` DECIMAL(10,2) DEFAULT 0.00 COMMENT '存储桶容量',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_storage_name` (`storage_name`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='对象存储服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `virtual_private_cloud_services`;
- -- 创建虚拟私有云服务表
- CREATE TABLE `virtual_private_cloud_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `subnet_name` VARCHAR(100) NOT NULL COMMENT '网段名称',
- `network_id` VARCHAR(100) NOT NULL COMMENT '网络ID',
- `subnet_address` VARCHAR(50) NOT NULL COMMENT '网段地址',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_network_id` (`network_id`),
- UNIQUE INDEX `idx_subnet_name` (`subnet_name`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_subnet_address` (`subnet_address`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='虚拟私有云服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `security_group_services`;
- -- 创建安全组服务表
- CREATE TABLE `security_group_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `security_group_name` VARCHAR(100) NOT NULL COMMENT '安全组名称',
- `security_policy` TEXT COMMENT '安全组策略',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_security_group_name` (`security_group_name`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='安全组服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `load_balancer_services`;
- -- 创建负载均衡服务表
- CREATE TABLE `load_balancer_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `instance_ids` TEXT COMMENT '实例ID组',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='负载均衡服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `elastic_ip_services`;
- -- 创建弹性IP服务表
- CREATE TABLE `elastic_ip_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `ip_type` VARCHAR(20) COMMENT 'IP类型',
- `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
- `ip_address` VARCHAR(50) NOT NULL COMMENT 'IP地址',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_ip_address` (`ip_address`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_ip_type` (`ip_type`),
- INDEX `idx_ip_version` (`ip_version`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='弹性IP服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `vpn_services`;
- -- 创建虚拟专用网络VPN服务表
- CREATE TABLE `vpn_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `vpn_name` VARCHAR(100) NOT NULL COMMENT 'VPN网络名称',
- `ip_subnet` VARCHAR(50) NOT NULL COMMENT 'IP网段',
- `vpn_type` VARCHAR(20) NOT NULL COMMENT '开通类型',
- `connection_limit` INT(6) DEFAULT 1 COMMENT '开通连接数量',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_vpn_name` (`vpn_name`),
- INDEX `idx_ip_subnet` (`ip_subnet`),
- INDEX `idx_vpn_type` (`vpn_type`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='虚拟专用网络VPN服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `big_data_compute_services`;
- -- 创建大数据计算服务表
- CREATE TABLE `big_data_compute_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `account_name` VARCHAR(50) NOT NULL COMMENT '开通账号',
- `configuration` TEXT COMMENT '开通配置',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_account_name` (`account_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='大数据计算服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `data_governance_services`;
- -- 创建数据治理平台服务表
- CREATE TABLE `data_governance_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `account_count` INT(6) DEFAULT 1 COMMENT '开通账号数量',
- `service_name` VARCHAR(100) NOT NULL COMMENT '服务名称',
- `service_description` TEXT COMMENT '服务说明',
- `configuration` TEXT COMMENT '开通配置',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_service_name` (`service_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='数据治理平台服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `distributed_cache_services`;
- -- 创建分布式缓存服务表
- CREATE TABLE `distributed_cache_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `deployment_type` VARCHAR(20) COMMENT '开通类型',
- `capacity` DECIMAL(10,2) DEFAULT 0.00 COMMENT '开通容量',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='分布式缓存服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `relational_database_services`;
- -- 创建关系型数据库服务表
- CREATE TABLE `relational_database_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `vcpu` INT(6) DEFAULT 1 COMMENT 'vCPU',
- `memory` INT(6) DEFAULT 1 COMMENT '内存',
- `system_disk` INT(6) DEFAULT 40 COMMENT '系统盘',
- `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
- `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
- `ip_address` VARCHAR(50) COMMENT 'IP地址',
- `host_status` VARCHAR(20) COMMENT '主机状态',
- `db_type` VARCHAR(50) COMMENT '数据库类型',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='关系型数据库服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `massive_database_services`;
- -- 创建海量数据库表
- CREATE TABLE `massive_database_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `major_version` INT(4) COMMENT '主版本号',
- `minor_version` INT(4) COMMENT '次版本号',
- `patch_level` INT(4) COMMENT '补丁级别',
- `update_date` DATETIME COMMENT '更新日期',
- `engine_type` VARCHAR(50) COMMENT '引擎类型',
- `engine_version` VARCHAR(50) COMMENT '引擎版本',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='海量数据库服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `dameng_database_services`;
- -- 创建达梦数据库表
- CREATE TABLE `dameng_database_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `major_version` INT(4) COMMENT '主版本号',
- `minor_version` INT(4) COMMENT '次版本号',
- `patch_level` INT(4) COMMENT '补丁级别',
- `update_date` DATETIME COMMENT '更新日期',
- `engine_type` VARCHAR(50) COMMENT '引擎类型',
- `engine_version` VARCHAR(50) COMMENT '引擎版本',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='达梦数据库服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `yashan_database_services`;
- -- 创建崖山数据库表
- CREATE TABLE `yashan_database_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `major_version` INT(4) COMMENT '主版本号',
- `minor_version` INT(4) COMMENT '次版本号',
- `patch_level` INT(4) COMMENT '补丁级别',
- `update_date` DATETIME COMMENT '更新日期',
- `engine_type` VARCHAR(50) COMMENT '引擎类型',
- `engine_version` VARCHAR(50) COMMENT '引擎版本',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='崖山数据库服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `microservices`;
- -- 创建微服务表
- CREATE TABLE `microservices` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `container_id` VARCHAR(100) NOT NULL COMMENT '容器ID',
- `service_name` VARCHAR(100) NOT NULL COMMENT '微服务名称',
- `configuration` TEXT COMMENT '配置',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_container_id` (`container_id`),
- UNIQUE INDEX `idx_service_name` (`service_name`),
- INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `container_services`;
- -- 创建容器服务表
- CREATE TABLE `container_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `container_id` VARCHAR(100) NOT NULL COMMENT '容器ID',
- `container_name` VARCHAR(100) NOT NULL COMMENT '容器名称',
- `configuration` TEXT COMMENT '配置',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_container_id` (`container_id`),
- UNIQUE INDEX `idx_container_name` (`container_name`),
- INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='容器服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `ams_application_grid_services`;
- -- 创建AMS应用网格服务表
- CREATE TABLE `ams_application_grid_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `business_name` VARCHAR(120) COMMENT '业务名称',
- `container_ids` TEXT COMMENT '容器ID组',
- `configuration` TEXT COMMENT '配置',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_business_name` (`business_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='AMS应用网格服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `application_data_integration_services`;
- -- 创建应用与数据集成平台服务表
- CREATE TABLE `application_data_integration_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `package_type` VARCHAR(20) COMMENT '开通类型',
- `connection_count` INT(6) DEFAULT 1 COMMENT '开通数量',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_package_type` (`package_type`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='应用与数据集成平台服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `apm_application_performance_management_services`;
- -- 创建APM应用性能管理服务表
- CREATE TABLE `apm_application_performance_management_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `probe_count` INT(6) DEFAULT 1 COMMENT '开通数量',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='APM应用性能管理服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `kunpeng_desktop_cloud_storage`;
- -- 创建鲲鹏桌面云云硬盘存储表
- CREATE TABLE `kunpeng_desktop_cloud_storage` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `disk_type` VARCHAR(50) COMMENT '磁盘类型',
- `disk_size` INT(6) COMMENT '磁盘大小',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='鲲鹏桌面云云硬盘存储表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `kunpeng_desktop_cloud_hosts`;
- -- 创建鲲鹏桌面云主机表
- CREATE TABLE `kunpeng_desktop_cloud_hosts` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `instance_id` VARCHAR(100) NOT NULL COMMENT '实例ID',
- `instance_name` VARCHAR(100) NOT NULL COMMENT '实例名称',
- `vcpu` INT(6) COMMENT 'vCPU',
- `memory` INT(6) COMMENT '内存',
- `system_disk` INT(6) COMMENT '系统盘',
- `system_disk_type` VARCHAR(20) COMMENT '系统盘类型',
- `os_type` VARCHAR(50) COMMENT '操作系统',
- `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
- `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
- `ip_address` VARCHAR(50) COMMENT 'IP地址',
- `instance_status` VARCHAR(20) COMMENT '云主机状态',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_instance_id` (`instance_id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_instance_name` (`instance_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='鲲鹏桌面云主机表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `security_services`;
- -- 创建安全服务表
- CREATE TABLE `security_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `security_type` VARCHAR(50) COMMENT '开通类型',
- `service_count` INT(6) DEFAULT 1 COMMENT '开通数量',
- `configuration` TEXT COMMENT '开通配置',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_security_type` (`security_type`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='安全服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `disaster_recovery_services`;
- -- 创建灾备服务表
- CREATE TABLE `disaster_recovery_services` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `backup_system_name` VARCHAR(120) COMMENT '备份系统名称',
- `backup_capacity` INT(6) COMMENT '备份容量',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_backup_system_name` (`backup_system_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='灾备服务表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `e_government_network`;
- -- 创建电子政务网表
- CREATE TABLE `e_government_network` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `business_type` VARCHAR(20) COMMENT '业务类型',
- `ip_type` VARCHAR(20) COMMENT 'IP地址类型',
- `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
- `ip_address` VARCHAR(50) COMMENT 'IP地址',
- `subnet_mask` VARCHAR(50) COMMENT '子网掩码',
- `gateway` VARCHAR(50) COMMENT '网关',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_business_type` (`business_type`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='电子政务网表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `domain_resolution`;
- -- 创建域名解析表
- CREATE TABLE `domain_resolution` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `network_type` VARCHAR(50) COMMENT '接入网络',
- `ip_address` VARCHAR(50) COMMENT 'IP地址',
- `domain_name` VARCHAR(100) COMMENT '域名地址',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_domain_name` (`domain_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='域名解析表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `port_opening`;
- -- 创建端口开放表
- CREATE TABLE `port_opening` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `network_type` VARCHAR(50) COMMENT '接入网络',
- `source_address` VARCHAR(100) COMMENT '源地址',
- `destination_address` VARCHAR(100) COMMENT '目的地址',
- `port_type` VARCHAR(20) COMMENT '端口类型',
- `port_number` VARCHAR(20) COMMENT '端口号',
- `port_usage` VARCHAR(200) COMMENT '端口用途',
- `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
- `ip_address` VARCHAR(50) COMMENT 'IP地址',
- `rdp_service_opened` VARCHAR(50) COMMENT 'RDP服务开通',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_port_number` (`port_number`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='端口开放表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `government_extranet_access`;
- -- 创建政务外网接入表
- CREATE TABLE `government_extranet_access` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `access_address` VARCHAR(100) COMMENT '接入地址',
- `network_level` VARCHAR(50) COMMENT '接入网络类型',
- `ip_type` VARCHAR(10) COMMENT 'IP地址类型',
- `ip_version` VARCHAR(10) COMMENT 'IPV4/IPV6',
- `ip_address` VARCHAR(50) COMMENT 'IP地址',
- `application_reason` VARCHAR(200) COMMENT '申请需求说明',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_access_address` (`access_address`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='政务外网接入表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `government_cloud_dedicated_line`;
- -- 创建政务云专线表
- CREATE TABLE `government_cloud_dedicated_line` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) COMMENT '工单编号',
- `organization_name` VARCHAR(120) COMMENT '申请单位名称',
- `system_manager` VARCHAR(20) COMMENT '申请联系人',
- `contact_phone` VARCHAR(15) COMMENT '申请联系人电话',
- `technical_contact` VARCHAR(20) COMMENT '技术联系人',
- `technical_contact_phone` VARCHAR(15) COMMENT '技术联系人电话',
- `user_unit` VARCHAR(120) COMMENT '使用单位',
- `system_name` VARCHAR(120) COMMENT '信息系统名称',
- `application_time` DATETIME COMMENT '申请时间',
- `recovery_time` DATETIME COMMENT '回收时间',
- `source_address` VARCHAR(50) COMMENT '源地址',
- `destination_address` VARCHAR(50) COMMENT '目的地址',
- `cloud_type` VARCHAR(50) COMMENT '接入云类型',
- `line_name` VARCHAR(100) COMMENT '线路名称',
- `start_node` VARCHAR(100) COMMENT '起始节点',
- `end_node` VARCHAR(100) COMMENT '终止节点',
- `route_info` TEXT COMMENT '路由信息',
- `application_reason` VARCHAR(200) COMMENT '申请需求说明',
- `dedicated_line_side_business_ip` VARCHAR(100) COMMENT '专线侧业务IP',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_line_name` (`line_name`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='政务云专线表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `ip_address_resources`;
- -- 创建IP地址资源表
- CREATE TABLE `ip_address_resources` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `ticket_number` VARCHAR(40) NOT NULL COMMENT '工单编号',
- `organization_name` VARCHAR(120) NOT NULL COMMENT '单位名称',
- `system_manager` VARCHAR(20) NOT NULL COMMENT '联系人',
- `system_manager_phone` VARCHAR(40) NOT NULL COMMENT '联系电话',
- `technical_manager` VARCHAR(20) NOT NULL COMMENT '技术负责人',
- `technical_manager_phone` VARCHAR(40) NOT NULL COMMENT '技术负责人电话',
- `system_name` VARCHAR(120) NOT NULL COMMENT '信息系统名称',
- `used_data_center` VARCHAR(50) NOT NULL COMMENT '使用数据中心',
- `ip_type` VARCHAR(20) NOT NULL COMMENT 'IP地址类型',
- `ip_version` VARCHAR(10) NOT NULL COMMENT 'IPV4/IPV6',
- `instance_id` VARCHAR(40) NOT NULL COMMENT '实例ID',
- `device_sn` VARCHAR(50) NOT NULL COMMENT '设备序列号',
- `ip_address` VARCHAR(50) NOT NULL COMMENT 'IP地址',
- `subnet_mask` VARCHAR(50) NOT NULL COMMENT '子网掩码',
- `gateway` VARCHAR(50) NOT NULL COMMENT '网关',
- `tcp_port` VARCHAR(50) NOT NULL COMMENT 'TCP协议端口号',
- `udp_port` VARCHAR(50) NOT NULL COMMENT 'UDP协议端口号',
- `city_network` VARCHAR(5) NOT NULL COMMENT '接通市网',
- `province_network` VARCHAR(5) NOT NULL COMMENT '接通省网',
- `national_network` VARCHAR(5) NOT NULL COMMENT '接通国家网',
- `status` VARCHAR(20) NOT NULL COMMENT '状态',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) NOT NULL COMMENT '创建者',
- `updated_by` BIGINT(10) NOT NULL COMMENT '更新者',
- `deleted_by` BIGINT(10) NOT NULL COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_ticket_number` (`ticket_number`),
- INDEX `idx_ip_address` (`ip_address`),
- INDEX `idx_organization_name` (`organization_name`),
- INDEX `idx_system_name` (`system_name`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='IP地址资源表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `alarm_info`;
- -- 创建告警信息表
- CREATE TABLE `alarm_info` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `source` VARCHAR(4) COMMENT '告警来源',
- `ip_address` VARCHAR(50) COMMENT 'IP',
- `alarm_name` VARCHAR(100) COMMENT '告警名称',
- `alarm_severity` INT(4) COMMENT '告警级别',
- `alarm_time` DATETIME COMMENT '告警时间',
- `alarm_content` TEXT COMMENT '告警内容',
- `alarm_status` TINYINT(1) COMMENT '告警状态',
- `remark` TEXT COMMENT '备注',
- `created_by` BIGINT(10) COMMENT '创建者',
- `updated_by` BIGINT(10) COMMENT '更新者',
- `deleted_by` BIGINT(10) COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- INDEX `idx_ip_address` (`ip_address`),
- INDEX `idx_alarm_name` (`alarm_name`),
- INDEX `idx_alarm_time` (`alarm_time`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='告警信息表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `dict_type`;
- -- 创建字典类型表
- CREATE TABLE `dict_type` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `dict_name` VARCHAR(100) NOT NULL COMMENT '字典名称',
- `dict_type` VARCHAR(100) NOT NULL COMMENT '字典类型',
- `status` TINYINT(1) NOT NULL COMMENT '字典状态',
- `remark` VARCHAR(200) COMMENT '备注',
- `created_by` BIGINT(10) NOT NULL COMMENT '创建者',
- `updated_by` BIGINT(10) NOT NULL COMMENT '更新者',
- `deleted_by` BIGINT(10) NOT NULL COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- UNIQUE INDEX `idx_dict_name` (`dict_name`),
- INDEX `idx_dict_type` (`dict_type`),
- INDEX `idx_status` (`status`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='字典类型表';
- -- 如果表存在则删除
- DROP TABLE IF EXISTS `dict_data`;
- -- 创建字典数据表
- CREATE TABLE `dict_data` (
- `id` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- `dict_type` VARCHAR(100) NOT NULL COMMENT '字典类型',
- `dict_label` VARCHAR(100) NOT NULL COMMENT '字典标签',
- `dict_value` VARCHAR(100) NOT NULL COMMENT '字典键值',
- `status` TINYINT(1) NOT NULL COMMENT '状态',
- `is_default` CHAR(1) NOT NULL COMMENT '是否默认',
- `sort` INT(4) NOT NULL COMMENT '排序',
- `remark` VARCHAR(200) COMMENT '备注',
- `created_by` BIGINT(10) NOT NULL COMMENT '创建者',
- `updated_by` BIGINT(10) NOT NULL COMMENT '更新者',
- `deleted_by` BIGINT(10) NOT NULL COMMENT '删除者',
- `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted_at` DATETIME COMMENT '删除时间',
- `deleted_flag` BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`),
- INDEX `idx_dict_type` (`dict_type`),
- INDEX `idx_dict_label` (`dict_label`),
- INDEX `idx_dict_value` (`dict_value`),
- INDEX `idx_status` (`status`),
- INDEX `idx_deleted_flag` (`deleted_flag`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='字典数据表';
|