export interface Sport { id: number; name: string; description: string; icon: string; isActive: boolean; updatedAt: string; createdAt: string; } export interface Match { id: string; league: string; time: string; home: string; away: string; meta?: string; scoreText: string; fav: boolean; } export interface ApiResponse { code: number; message: string; data: T; } export interface ApiListResponse { list: T[]; total: number; } export interface Country { id: number; code: string; name: string; flagIcon: string; createdAt: string; updatedAt: string; isActive: boolean; } export interface League { id: number; key: string; name: string; description: string; sportId: number; countryKey: string; countryName: string; countryLogo: string; logo: string; isActive: boolean; createdAt: string; updatedAt: string; } export interface GoalEvent { time: string; home_scorer?: string; away_scorer?: string; score?: string; comment?: string; } export interface CardEvent { time: string; home_fault?: string; away_fault?: string; card?: string; comment?: string; } export interface SubstituteEvent { time: string; home_scorer?: string; away_scorer?: string; home_assist?: string; away_assist?: string; home_scorer_out?: string; away_scorer_out?: string; comment?: string; } export interface MatchEvents { goalscorers: GoalEvent[]; cards: CardEvent[]; substitutes: SubstituteEvent[]; } export interface Player { // AllSports API 常见字段 player?: string; // 有些接口用 player player_name?: string; // 有些接口用 player_name name?: string; // 兜底 player_number?: number | string; number?: number | string; player_type?: string; // 位置/角色,例如 Goalkeepers position?: string; // 兜底位置字段 } export interface UpcomingMatch { id: number; eventKey: string; sportId: number; leagueKey: string; leagueName: string; leagueLogo: string; leagueGroup: string; countryKey: string; countryName: string; countryLogo: string; season: string; round: string; stageName: string; eventDate: string; eventTime: string; status: string; // scheduled venue: string; referee: string; homeTeamKey: string; homeTeamName: string; homeTeamLogo: string; homeFormation: string; homeScore: number; homeHalfScore: number; homeShots: number; homeShotsOnTarget: number; homePossession: number; homeYellowCards: number; homeRedCards: number; awayTeamKey: string; awayTeamName: string; awayTeamLogo: string; awayFormation: string; awayScore: number; awayHalfScore: number; awayShots: number; awayShotsOnTarget: number; awayPossession: number; awayYellowCards: number; awayRedCards: number; eventLive: boolean; createdAt: string; updatedAt: string; } export interface MatchDetailData { events: any[]; match: { ID: number; CreatedAt: string; UpdatedAt: string; DeletedAt: string | null; eventKey: string; eventDate: string; eventTime: string; eventHomeTeam: string; homeTeamKey: string; homeTeamLogo: string; eventAwayTeam: string; awayTeamKey: string; awayTeamLogo: string; eventHalftimeResult: string; eventFinalResult: string; eventFtResult: string; eventPenaltyResult: string; eventStatus: string; countryName: string; leagueName: string; leagueKey: string; leagueRound: string; leagueSeason: string; eventLive: string; eventStadium: string; eventReferee: string; eventCountryKey: string; leagueLogo: string; countryLogo: string; eventHomeFormation: string; eventAwayFormation: string; fkStageKey: string; stageName: string; leagueGroup: string; sportId: number; eventQuarter: string; eventSet: string; eventType: string; eventToss: string; eventManOfMatch: string; events?: MatchEvents; players?: { home_team?: Player[]; away_team?: Player[]; }; }; } // 实时赔率(根据 sportId 可能是 LiveOdds 或 Odds 结构,暂时使用宽泛类型) export interface OddsData { [key: string]: any; }