--
-- Table structure for table `alarm_log`
--
CREATE TABLE IF NOT EXISTS `alarm_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `ne_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `alarm_seq` int DEFAULT '0' COMMENT '告警序号 同网元类型连续递增',
  `alarm_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '告警ID',
  `alarm_code` int DEFAULT '0' COMMENT '告警状态码',
  `alarm_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '告警标题',
  `alarm_status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '1' COMMENT '告警状态 0:clear, 1:active',
  `alarm_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '告警类型 CommunicationAlarm=1,EquipmentAlarm=2,ProcessingFailure=3,EnvironmentalAlarm=4,QualityOfServiceAlarm=5',
  `orig_severity` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '3' COMMENT '严重程度 1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF)',
  `event_time` bigint DEFAULT '0' COMMENT '事件产生时间 秒级',
  `created_at` bigint DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='告警_日志记录';

-- ----------------------------
-- COLUMN for alarm_log
-- ----------------------------
ALTER TABLE `alarm_log` DROP COLUMN `log_time`;
ALTER TABLE `alarm_log` COMMENT = '告警_日志记录';
ALTER TABLE `alarm_log` MODIFY COLUMN `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `id`;
ALTER TABLE `alarm_log` MODIFY COLUMN `ne_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' AFTER `ne_type`;
ALTER TABLE `alarm_log` MODIFY COLUMN `alarm_seq` int(11) NULL DEFAULT 0 COMMENT '告警序号 同网元类型连续递增' AFTER `ne_id`;
ALTER TABLE `alarm_log` MODIFY COLUMN `alarm_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '告警ID' AFTER `alarm_seq`;
ALTER TABLE `alarm_log` MODIFY COLUMN `alarm_code` int(11) NULL DEFAULT 0 COMMENT '告警状态码' AFTER `alarm_id`;
ALTER TABLE `alarm_log` ADD COLUMN `alarm_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '告警标题' AFTER `alarm_code`;
ALTER TABLE `alarm_log` MODIFY COLUMN `alarm_status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '告警状态 0:clear, 1:active' AFTER `alarm_title`;
ALTER TABLE `alarm_log` ADD COLUMN `alarm_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '告警类型 CommunicationAlarm=1,EquipmentAlarm=2,ProcessingFailure=3,EnvironmentalAlarm=4,QualityOfServiceAlarm=5' AFTER `alarm_status`;
ALTER TABLE `alarm_log` ADD COLUMN `orig_severity` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '3' COMMENT '严重程度 1: Critical, 2: Major, 3: Minor, 4: Warning, 5: Event(Only VNF)' AFTER `alarm_type`;
ALTER TABLE `alarm_log` MODIFY COLUMN `event_time` bigint(20) NULL DEFAULT 0 COMMENT '事件产生时间 秒级' AFTER `orig_severity`;
ALTER TABLE `alarm_log` ADD COLUMN `created_at` bigint(20) NULL DEFAULT 0 COMMENT '创建时间' AFTER `event_time`;

-- Dump completed on 2024-02-18 18:26:55
