This commit is contained in:
2025-12-11 21:06:25 +01:00
parent c49ea2598d
commit ec3ddc3a5c
227 changed files with 3496 additions and 2083 deletions

View File

@@ -48,16 +48,22 @@ export class SeasonSponsorship implements IEntity<string> {
this.description = props.description;
}
static create(props: Omit<SeasonSponsorshipProps, 'createdAt' | 'status'> & {
static create(props: Omit<SeasonSponsorshipProps, 'createdAt' | 'status'> & {
createdAt?: Date;
status?: SponsorshipStatus;
}): SeasonSponsorship {
this.validate(props);
return new SeasonSponsorship({
...props,
createdAt: props.createdAt ?? new Date(),
id: props.id,
seasonId: props.seasonId,
sponsorId: props.sponsorId,
tier: props.tier,
pricing: props.pricing,
status: props.status ?? 'pending',
createdAt: props.createdAt ?? new Date(),
...(props.activatedAt !== undefined ? { activatedAt: props.activatedAt } : {}),
...(props.description !== undefined ? { description: props.description } : {}),
});
}