Pular para o conteúdo principal

computeChampionshipStandings

@raizfc/contracts


@raizfc/contracts / computeChampionshipStandings

Function: computeChampionshipStandings()

computeChampionshipStandings(matches): readonly Readonly<{ draws: number; goalDifference: number; goalsAgainst: number; goalsFor: number; groupName?: string; losses: number; played: number; points: number; position: number; provisional: boolean; teamId: string; teamName: string; teamRoute: string; wins: number; }>[]

Defined in: championship/championship-standings.dto.ts:66

Standard football sort: points desc, goal difference desc, goals scored desc, team name asc (deterministic tie-break with no further criteria specified by the IS). Computed per group when groupName is present on any match, otherwise as a single flat table.

Parameters

matches

readonly Readonly<{ awayScore: number; awayTeam: PublicTeamSummaryDto; events: readonly Readonly<{ description: string; id: string; minuteLabel: string; period: "administrative" | "first_half" | "second_half" | "extra_time" | "penalties"; primaryPlayer?: Readonly<{ displayName: string; playerId?: string; publicRoute?: string; }>; secondaryPlayer?: Readonly<{ displayName: string; playerId?: string; publicRoute?: string; }>; teamId?: string; type: PublicMatchEventType; }>[]; groupName?: string; homeScore: number; homeTeam: PublicTeamSummaryDto; matchId: string; }>[]

Returns

readonly Readonly<{ draws: number; goalDifference: number; goalsAgainst: number; goalsFor: number; groupName?: string; losses: number; played: number; points: number; position: number; provisional: boolean; teamId: string; teamName: string; teamRoute: string; wins: number; }>[]