website refactor
This commit is contained in:
39
apps/website/lib/view-data/LeagueStandingsViewData.ts
Normal file
39
apps/website/lib/view-data/LeagueStandingsViewData.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
Reference in New Issue
Block a user