view models
This commit is contained in:
19
apps/website/lib/view-models/CreateTeamViewModel.ts
Normal file
19
apps/website/lib/view-models/CreateTeamViewModel.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* View Model for Create Team Result
|
||||
*
|
||||
* Represents the result of creating a team in a UI-ready format.
|
||||
*/
|
||||
export class CreateTeamViewModel {
|
||||
id: string;
|
||||
success: boolean;
|
||||
|
||||
constructor(dto: { id: string; success: boolean }) {
|
||||
this.id = dto.id;
|
||||
this.success = dto.success;
|
||||
}
|
||||
|
||||
/** UI-specific: Success message */
|
||||
get successMessage(): string {
|
||||
return this.success ? 'Team created successfully!' : 'Failed to create team.';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user