SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

--
-- Table structure for table `ne_info`
--
CREATE TABLE IF NOT EXISTS `ne_info` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网元类型',
  `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网元ID',
  `rm_uid` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '网元资源唯一标识',
  `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '网元名称',
  `ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '网元服务IP',
  `port` int DEFAULT '0' COMMENT '端口',
  `pv_flag` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'PNF' COMMENT '网元虚拟化标识 物理PNF 虚拟VNF',
  `province` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'AreaNet' COMMENT '省份地域',
  `vendor_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '-' COMMENT '厂商名称',
  `dn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '-' COMMENT '网络标识',
  `ne_address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'MAC地址',
  `host_ids` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '网元主机ID组 数据格式(ssh,telnet) UDM(ssh,telnet,redis) UPF(ssh,telnet,telnet)',
  `status` int DEFAULT '0' COMMENT '网元状态 0离线 1在线 2配置待下发 3备用模式',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '备注',
  `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者',
  `create_time` bigint DEFAULT '0' COMMENT '创建时间',
  `update_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者',
  `update_time` bigint DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `ux_netype_neid` (`ne_type`,`ne_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='网元_基础信息表 关联对应版本、授权、主机';

-- ----------------------------
-- COLUMN for ne_info
-- ----------------------------
ALTER TABLE `ne_info` MODIFY COLUMN `id` bigint(20) NOT NULL FIRST;
ALTER TABLE `ne_info` MODIFY COLUMN `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网元类型' AFTER `id`;
ALTER TABLE `ne_info` MODIFY COLUMN `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网元ID' AFTER `ne_type`;
ALTER TABLE `ne_info` MODIFY COLUMN `rm_uid` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '网元资源唯一标识' AFTER `ne_id`;
ALTER TABLE `ne_info` MODIFY COLUMN `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '网元名称' AFTER `rm_uid`;
ALTER TABLE `ne_info` MODIFY COLUMN `ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '网元服务IP' AFTER `ne_name`;
ALTER TABLE `ne_info` MODIFY COLUMN `pv_flag` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'PNF' COMMENT '网元虚拟化标识 物理PNF 虚拟VNF' AFTER `port`;
ALTER TABLE `ne_info` MODIFY COLUMN `province` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'AreaNet' COMMENT '省份地域' AFTER `pv_flag`;
ALTER TABLE `ne_info` MODIFY COLUMN `vendor_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '厂商名称' AFTER `province`;
ALTER TABLE `ne_info` MODIFY COLUMN `dn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-' COMMENT '网络标识' AFTER `vendor_name`;
ALTER TABLE `ne_info` MODIFY COLUMN `host_ids` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '网元主机ID组 数据格式(ssh,telnet) UDM(ssh,telnet,redis) UPF(ssh,telnet,telnet)' AFTER `ne_address`;
ALTER TABLE `ne_info` MODIFY COLUMN `status` int(11) NULL DEFAULT 0 COMMENT '网元状态 0离线 1在线 2配置待下发 3备用模式' AFTER `host_ids`;
ALTER TABLE `ne_info` COMMENT = '网元_基础信息表 关联对应版本、授权、主机';
ALTER TABLE `ne_info` MODIFY COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT;

-- ----------------------------
-- Data for ne_info
-- ----------------------------
INSERT IGNORE INTO `ne_info` VALUES (1, 'OMC', '001', '4400HXOMC001', 'OMC_001', '127.0.0.1', 33030, 'PNF', 'AreaNet', '-', '-', '-', '1,2', 0, '', 'system', 1713928436971, '', 0);

SET FOREIGN_KEY_CHECKS=1;

-- Dump completed on 2025-02-14 15:26:56
