Files
gridpilot.gg/apps/website/lib/view-models/SponsorProfileViewModel.ts
2026-01-23 15:30:23 +01:00

45 lines
1.2 KiB
TypeScript

import { ViewModel } from "../contracts/view-models/ViewModel";
import type { SponsorProfileViewData } from "../view-data/SponsorProfileViewData";
export class SponsorProfileViewModel extends ViewModel {
companyName: string;
contactName: string;
contactEmail: string;
contactPhone: string;
website: string;
description: string;
logoUrl: string | null;
industry: string;
address: {
street: string;
city: string;
country: string;
postalCode: string;
};
taxId: string;
socialLinks: {
twitter: string;
linkedin: string;
instagram: string;
};
constructor(data: SponsorProfileViewData) {
super();
this.companyName = data.companyName;
this.contactName = data.contactName;
this.contactEmail = data.contactEmail;
this.contactPhone = data.contactPhone;
this.website = data.website;
this.description = data.description;
this.logoUrl = data.logoUrl;
this.industry = data.industry;
this.address = data.address;
this.taxId = data.taxId;
this.socialLinks = data.socialLinks;
}
get fullAddress(): string {
return `${this.address.street}, ${this.address.city}, ${this.address.postalCode}, ${this.address.country}`;
}
}