CREATE TABLE IF NOT EXISTS `la_lottery_draw_result` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `code` varchar(30) NOT NULL DEFAULT '' COMMENT '彩种编码(关联la_lottery_game.code)',
  `issue` varchar(30) NOT NULL DEFAULT '' COMMENT '期号',
  `draw_time` datetime DEFAULT NULL COMMENT '开奖时间',
  `draw_code` varchar(255) NOT NULL DEFAULT '' COMMENT '开奖号码(逗号分隔)',
  `draw_ext` varchar(500) NOT NULL DEFAULT '' COMMENT '扩展号码(台湾宾果等)',
  `status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '开奖状态 1已开奖 4停售等',
  `idx` int unsigned NOT NULL DEFAULT 0 COMMENT '当日期数索引(index)',
  `next_issue` varchar(30) NOT NULL DEFAULT '' COMMENT '下期期号',
  `next_time` datetime DEFAULT NULL COMMENT '下期开奖时间',
  `trend` json DEFAULT NULL COMMENT '走势数据(JSON)',
  `s_time` datetime DEFAULT NULL COMMENT '数据同步时间(API sTime)',
  `create_time` int unsigned NOT NULL DEFAULT 0,
  `update_time` int unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_code_issue` (`code`, `issue`),
  KEY `idx_code_draw_time` (`code`, `draw_time`),
  KEY `idx_draw_time` (`draw_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='彩种开奖结果表';
