CREATE TABLE IF NOT EXISTS `la_match_odds` (
  `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
  `source_site` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '赔率来源',
  `source_url` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '来源线路',
  `source_match_id` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '来源比赛ID',
  `source_parent_id` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '来源主比赛ID',
  `source_league_id` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '来源联赛ID',
  `source_event_id` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '来源事件ID',
  `sport_type` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '运动类型',
  `show_type` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '盘口类型 live/today/early',
  `odds_type` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '赔率格式',
  `league_name` VARCHAR(150) NOT NULL DEFAULT '' COMMENT '联赛名称',
  `match_time_text` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '来源比赛时间文本',
  `home_team_id` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '主队来源ID',
  `away_team_id` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '客队来源ID',
  `home_team` VARCHAR(150) NOT NULL DEFAULT '' COMMENT '主队名称',
  `away_team` VARCHAR(150) NOT NULL DEFAULT '' COMMENT '客队名称',
  `strong_side` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '让球强弱方',
  `more_count` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT '更多玩法数量',
  `is_running` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否滚球',
  `handicap_line` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '让球盘口',
  `handicap_home_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '主队让球赔率',
  `handicap_away_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '客队让球赔率',
  `total_line` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '大小球盘口',
  `total_over_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '大球赔率',
  `total_under_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '小球赔率',
  `home_win_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '主胜赔率',
  `draw_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '平局赔率',
  `away_win_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '客胜赔率',
  `half_handicap_line` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '上半场让球盘口',
  `half_home_win_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '上半场主胜赔率',
  `half_draw_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '上半场平局赔率',
  `half_away_win_odds` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '上半场客胜赔率',
  `create_time` INT UNSIGNED NOT NULL DEFAULT 0,
  `raw_data` JSON NULL COMMENT '来源原始game节点',
  `markets_json` JSON NULL COMMENT '规范化盘口JSON',
  `update_time` INT UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_source_match` (`source_site`, `source_match_id`),
  KEY `idx_sport_show` (`sport_type`, `show_type`),
  KEY `idx_league` (`source_league_id`),
  KEY `idx_update_time` (`update_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='第三方赛事赔率表';
