view models
This commit is contained in:
17
apps/website/lib/view-models/LeagueStatsViewModel.ts
Normal file
17
apps/website/lib/view-models/LeagueStatsViewModel.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* View Model for League Statistics
|
||||
*
|
||||
* Represents the total number of leagues in a UI-ready format.
|
||||
*/
|
||||
export class LeagueStatsViewModel {
|
||||
totalLeagues: number;
|
||||
|
||||
constructor(dto: { totalLeagues: number }) {
|
||||
this.totalLeagues = dto.totalLeagues;
|
||||
}
|
||||
|
||||
/** UI-specific: Formatted total leagues display */
|
||||
get formattedTotalLeagues(): string {
|
||||
return this.totalLeagues.toLocaleString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user