import type { LeagueSummaryDTO } from '@/lib/types/generated/LeagueSummaryDTO'; interface LeagueCardDTO { id: string; name: string; description?: string; } /** * League card view model * UI representation of a league on the landing page. */ import { ViewModel } from "../contracts/view-models/ViewModel"; export class LeagueCardViewModel extends ViewModel { readonly id: string; readonly name: string; readonly description: string; constructor(dto: LeagueCardDTO | LeagueSummaryDTO & { description?: string }) { this.id = dto.id; this.name = dto.name; this.description = dto.description ?? 'Competitive iRacing league'; } }