CREATE TABLE IF NOT EXISTS game_explore_winners (
  app_code VARCHAR(32) NOT NULL COMMENT '应用编码，用于多租户隔离',
  win_id VARCHAR(96) NOT NULL COMMENT 'Explore Square 播报 ID',
  game_code VARCHAR(64) NOT NULL COMMENT 'App H5 入口 key，例如 game_dice/game_rock',
  game_id VARCHAR(96) NOT NULL COMMENT '来源游戏 ID',
  user_id BIGINT NOT NULL COMMENT '获胜用户 ID',
  display_name VARCHAR(128) NOT NULL DEFAULT '' COMMENT '展示昵称快照',
  avatar_url VARCHAR(512) NOT NULL DEFAULT '' COMMENT '展示头像快照',
  coin_amount BIGINT NOT NULL COMMENT '获胜金币数',
  won_at_ms BIGINT NOT NULL COMMENT '获胜时间，UTC epoch ms',
  created_at_ms BIGINT NOT NULL COMMENT '创建时间，UTC epoch ms',
  updated_at_ms BIGINT NOT NULL COMMENT '更新时间，UTC epoch ms',
  PRIMARY KEY(app_code, win_id),
  KEY idx_game_explore_winners_time(app_code, won_at_ms, win_id),
  KEY idx_game_explore_winners_game(app_code, game_code, won_at_ms)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Explore Square 游戏获胜播报表';
