Files
gridpilot.gg/apps/website/lib/view-data/LeagueStandingsViewData.ts
2026-01-12 16:12:01 +01:00

39 lines
868 B
TypeScript

/**
* LeagueStandingsViewData - Pure ViewData for LeagueStandingsTemplate
* Contains only raw serializable data, no methods or computed properties
*/
export interface StandingEntryData {
driverId: string;
position: number;
points: number;
wins: number;
podiums: number;
races: number;
}
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;
}