40 lines
1.0 KiB
TypeScript
40 lines
1.0 KiB
TypeScript
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
|
|
|
/**
|
|
* Leagues ViewData
|
|
*
|
|
* SSR-safe data structure that can be built directly from DTO
|
|
* without ViewModel instantiation. Contains formatted values
|
|
* for display and ISO string timestamps for JSON serialization.
|
|
*/
|
|
|
|
|
|
export interface LeaguesViewData extends ViewData {
|
|
leagues: Array<{
|
|
id: string;
|
|
name: string;
|
|
description: string | null;
|
|
logoUrl: string | null;
|
|
ownerId: string;
|
|
createdAt: string; // ISO string
|
|
maxDrivers: number;
|
|
usedDriverSlots: number;
|
|
activeDriversCount?: number;
|
|
nextRaceAt?: string;
|
|
maxTeams: number | undefined;
|
|
usedTeamSlots: number | undefined;
|
|
structureSummary: string;
|
|
timingSummary: string;
|
|
category: string | null;
|
|
scoring: {
|
|
gameId: string;
|
|
gameName: string;
|
|
primaryChampionshipType: 'driver' | 'team' | 'nations' | 'trophy';
|
|
scoringPresetId: string;
|
|
scoringPresetName: string;
|
|
dropPolicySummary: string;
|
|
scoringPatternSummary: string;
|
|
} | undefined;
|
|
}>;
|
|
}
|