"""
MatchData dataclass — core data transfer object used throughout the engine.
"""

from __future__ import annotations

from dataclasses import dataclass
from typing import Any, Dict, List, Optional


@dataclass
class MatchData:
    match_id: str
    home_team_id: str
    away_team_id: str
    home_team_name: str
    away_team_name: str
    match_date_ms: int
    sport: str
    league_id: Optional[str]
    league_name: str
    referee_name: Optional[str]
    odds_data: Dict[str, float]
    home_lineup: Optional[List[str]]
    away_lineup: Optional[List[str]]
    sidelined_data: Optional[Dict[str, Any]]
    home_goals_avg: float
    home_conceded_avg: float
    away_goals_avg: float
    away_conceded_avg: float
    home_position: int
    away_position: int
    lineup_source: str
    status: str = ""
    state: Optional[str] = None
    substate: Optional[str] = None
    current_score_home: Optional[int] = None
    current_score_away: Optional[int] = None
    lineup_confidence: float = 0.0
    source_table: str = "matches"
