DROP TABLE IF EXISTS `th_alarm_log`;
CREATE TABLE `th_alarm_log`  (
                                 `id` int(0) UNSIGNED NOT NULL DEFAULT 1,
                                 `airport_id` int(0) NULL DEFAULT NULL COMMENT '机场ID',
                                 `edge_Id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '控制板id',
                                 `timestamp` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '时间戳，日志发送的时间 (单位: S)',
                                 `type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '日志类型(log: 常规日志;error: 错误日志; critical: 紧急日志)',
                                 `data` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '消息主体',
                                 `critical` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '紧急消息主体',
                                 `result` int(0) NULL DEFAULT NULL COMMENT '是否处理， 1 : 已处理， 0: 未处理',
                                 `create_user` int(0) NULL DEFAULT NULL,
                                 `create_time` datetime(0) NULL DEFAULT NULL,
                                 `update_user` int(0) NULL DEFAULT NULL,
                                 `update_time` datetime(0) NULL DEFAULT NULL,
                                 `mark` int(0) NULL DEFAULT 1 COMMENT '有效标识(1正常 0删除)',
                                 PRIMARY KEY (`id`) USING BTREE,
                                 INDEX `idx_airport_id`(`airport_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '机场告警记录表' ROW_FORMAT = Dynamic;
