--
-- Table structure for table `alarm_forward_log`
--

DROP TABLE IF EXISTS `alarm_forward_log`;
CREATE TABLE `alarm_forward_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `core_uid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '核心网唯一标识',
  `ne_uid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '网元唯一标识',
  `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '网元类型',
  `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(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'Active' COMMENT '告警状态',
  `alarm_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '告警类型',
  `orig_severity` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'Minor' COMMENT '严重程度 ',
  `event_time` bigint DEFAULT '0' COMMENT '事件产生时间',
  `created_at` bigint DEFAULT '0' COMMENT '创建时间',
  `type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '转发方式 SMS/EMAIL',
  `target` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '发送目标用户',
  `result` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '发送结果',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_alarm_forward_cn_uid_at` (`core_uid` DESC, `ne_uid` DESC, `created_at` DESC) USING BTREE COMMENT '索引-核心网_资源标识_记录时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='告警_转发日志记录';

SET FOREIGN_KEY_CHECKS=1;
