--
-- Table structure for table `ue_event`
--
CREATE TABLE IF NOT EXISTS `ue_event` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `rm_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '可能没有',
  `timestamp` bigint DEFAULT '0' COMMENT '接收到时间',
  `event_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '事件类型',
  `event_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT 'data JSON String',
  `created_at` bigint DEFAULT '0' COMMENT '记录创建存储毫秒',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_type_t` (`event_type`,`timestamp`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='UE事件_基础表结构';

-- ----------------------------
-- COLUMN for ue_event
-- ----------------------------
ALTER TABLE `ue_event` DROP INDEX `id`;
ALTER TABLE `ue_event` DROP INDEX `idx_type_timestamp`;
ALTER TABLE `ue_event` MODIFY COLUMN `ne_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `id`;
ALTER TABLE `ue_event` MODIFY COLUMN `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `ne_type`;
ALTER TABLE `ue_event` MODIFY COLUMN `rm_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '可能没有' AFTER `ne_name`;
ALTER TABLE `ue_event` MODIFY COLUMN `timestamp` bigint(20) NULL DEFAULT 0 COMMENT '接收到时间' AFTER `rm_uid`;
ALTER TABLE `ue_event` MODIFY COLUMN `event_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '事件类型' AFTER `timestamp`;
ALTER TABLE `ue_event` MODIFY COLUMN `event_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'data JSON String' AFTER `event_type`;
ALTER TABLE `ue_event` MODIFY COLUMN `created_at` bigint(20) NULL DEFAULT 0 COMMENT '记录创建存储毫秒' AFTER `event_json`;
ALTER TABLE `ue_event` ADD INDEX `idx_type_t`(`event_type`, `timestamp`) USING BTREE;
ALTER TABLE `ue_event` COMMENT = 'UE事件_基础表结构';

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