24 lines
620 B
TypeScript
24 lines
620 B
TypeScript
import { SponsorDashboardDTO } from '@/lib/types/generated/SponsorDashboardDTO';
|
|
|
|
/**
|
|
* Sponsor Dashboard View Model
|
|
*
|
|
* Represents dashboard data for a sponsor with UI-specific transformations.
|
|
*/
|
|
import { ViewModel } from "../contracts/view-models/ViewModel";
|
|
|
|
export class SponsorDashboardViewModel extends ViewModel {
|
|
sponsorId: string;
|
|
sponsorName: string;
|
|
|
|
constructor(dto: SponsorDashboardDTO) {
|
|
this.sponsorId = dto.sponsorId;
|
|
this.sponsorName = dto.sponsorName;
|
|
}
|
|
|
|
/** UI-specific: Welcome message */
|
|
get welcomeMessage(): string {
|
|
return `Welcome back, ${this.sponsorName}!`;
|
|
}
|
|
}
|