42 lines
967 B
TypeScript
42 lines
967 B
TypeScript
/**
|
|
* LeagueStandingsViewData - Pure ViewData for LeagueStandingsTemplate
|
|
* Contains only raw serializable data, no methods or computed properties
|
|
*/
|
|
|
|
export interface StandingEntryData {
|
|
driverId: string;
|
|
position: number;
|
|
totalPoints: number;
|
|
racesFinished: number;
|
|
racesStarted: number;
|
|
avgFinish: number | null;
|
|
penaltyPoints: number;
|
|
bonusPoints: number;
|
|
teamName?: string;
|
|
}
|
|
|
|
export interface DriverData {
|
|
id: string;
|
|
name: string;
|
|
avatarUrl: string | null;
|
|
iracingId?: string;
|
|
rating?: number;
|
|
country?: string;
|
|
}
|
|
|
|
export interface LeagueMembershipData {
|
|
driverId: string;
|
|
leagueId: string;
|
|
role: 'owner' | 'admin' | 'steward' | 'member';
|
|
joinedAt: string;
|
|
status: 'active' | 'pending' | 'banned';
|
|
}
|
|
|
|
export interface LeagueStandingsViewData {
|
|
standings: StandingEntryData[];
|
|
drivers: DriverData[];
|
|
memberships: LeagueMembershipData[];
|
|
leagueId: string;
|
|
currentDriverId: string | null;
|
|
isAdmin: boolean;
|
|
} |