website refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Represents a sponsor that can sponsor leagues/seasons.
|
||||
* Aggregate root for sponsor information.
|
||||
*/
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { SponsorCreatedAt } from './SponsorCreatedAt';
|
||||
import { SponsorEmail } from './SponsorEmail';
|
||||
import { SponsorId } from './SponsorId';
|
||||
@@ -13,8 +13,7 @@ import { Url } from './Url';
|
||||
|
||||
// TODO sponsor is not actually the racing domain in my opinion
|
||||
|
||||
export class Sponsor implements Entity<SponsorId> {
|
||||
readonly id: SponsorId;
|
||||
export class Sponsor extends Entity<SponsorId> {
|
||||
readonly name: SponsorName;
|
||||
readonly contactEmail: SponsorEmail;
|
||||
readonly logoUrl: Url | undefined;
|
||||
@@ -29,7 +28,8 @@ export class Sponsor implements Entity<SponsorId> {
|
||||
websiteUrl?: Url;
|
||||
createdAt: SponsorCreatedAt;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.name = props.name;
|
||||
this.contactEmail = props.contactEmail;
|
||||
this.logoUrl = props.logoUrl ?? undefined;
|
||||
|
||||
Reference in New Issue
Block a user