SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

--
-- Table structure for table `ne_license`
--
CREATE TABLE IF NOT EXISTS `ne_license` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元类型',
  `ne_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网元ID',
  `activation_request_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '激活申请代码',
  `license_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '激活授权文件',
  `serial_num` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '-' COMMENT '序列号',
  `expiry_date` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '-' COMMENT '许可证到期日期',
  `ue_number` bigint DEFAULT '0' COMMENT '用户容量',
  `nb_number` bigint DEFAULT '0' COMMENT '基站容量',
  `status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '状态 0无效 1有效',
  `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 `uk_lic_type_id` (`ne_type`,`ne_id`) USING BTREE COMMENT '唯一网元类型和网元ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='网元_授权激活信息';

-- ----------------------------
-- COLUMN for ne_license
-- ----------------------------
ALTER TABLE `ne_license` DROP INDEX `uk_type_id`;
ALTER TABLE `ne_license` MODIFY COLUMN `id` bigint(20) NOT NULL FIRST;
ALTER TABLE `ne_license` DROP COLUMN `capability`;
ALTER TABLE `ne_license` ADD COLUMN `ue_number` bigint(20) NULL DEFAULT 0 COMMENT '用户容量' AFTER `expiry_date`;
ALTER TABLE `ne_license` ADD COLUMN `nb_number` bigint(20) NULL DEFAULT 0 COMMENT '基站容量' AFTER `ue_number`;
ALTER TABLE `ne_license` ADD UNIQUE INDEX `uk_lic_type_id`(`ne_type`, `ne_id`) USING BTREE COMMENT '唯一网元类型和网元ID';
ALTER TABLE `ne_license` COMMENT = '网元_授权激活信息';
ALTER TABLE `ne_license` MODIFY COLUMN `id` bigint(20) NOT NULL AUTO_INCREMENT;

-- ----------------------------
-- Data for ne_license
-- ----------------------------
INSERT IGNORE INTO `ne_license` VALUES (1, 'OMC', '001', '', '', '', '', 0, 0, '0', '', 'system', 1713928436971, '', 0);

SET FOREIGN_KEY_CHECKS=1;

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