view models

This commit is contained in:
2025-12-18 13:48:35 +01:00
parent cc2553876a
commit 91adbb9c83
71 changed files with 3119 additions and 359 deletions

View File

@@ -0,0 +1,21 @@
import { CreateLeagueOutputDTO } from '../types/generated/CreateLeagueOutputDTO';
/**
* View Model for Create League Result
*
* Represents the result of creating a league in a UI-ready format.
*/
export class CreateLeagueViewModel implements CreateLeagueOutputDTO {
leagueId: string;
success: boolean;
constructor(dto: CreateLeagueOutputDTO) {
this.leagueId = dto.leagueId;
this.success = dto.success;
}
/** UI-specific: Success message */
get successMessage(): string {
return this.success ? 'League created successfully!' : 'Failed to create league.';
}
}