SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for cdr_event_sgwc
-- ----------------------------
DROP TABLE IF EXISTS `cdr_event_sgwc`;
CREATE TABLE `cdr_event_sgwc` (
  `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 '网元类型',
  `timestamp` bigint DEFAULT '0' COMMENT '接收到的timestamp秒级存储毫秒时间戳',
  `cdr_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_cdr_sgwc_uid_t` (`ne_uid`,`timestamp`) USING BTREE,
  KEY `idx_cdr_sgwc_uid_type` (`core_uid`,`ne_uid`,`ne_type`) USING BTREE COMMENT '索引-核心网_资源标识_类型'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='CDR事件_SGWC';

SET FOREIGN_KEY_CHECKS = 1;
