website refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* (driver, team, race, or league/season). The entity owner must approve/reject.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainInvariantError, RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
|
||||
import type { Money } from '../value-objects/Money';
|
||||
@@ -29,8 +29,7 @@ export interface SponsorshipRequestProps {
|
||||
rejectionReason?: string;
|
||||
}
|
||||
|
||||
export class SponsorshipRequest implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class SponsorshipRequest extends Entity<string> {
|
||||
readonly sponsorId: string;
|
||||
readonly entityType: SponsorableEntityType;
|
||||
readonly entityId: string;
|
||||
@@ -44,7 +43,8 @@ export class SponsorshipRequest implements Entity<string> {
|
||||
readonly rejectionReason: string | undefined;
|
||||
|
||||
private constructor(props: SponsorshipRequestProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.sponsorId = props.sponsorId;
|
||||
this.entityType = props.entityType;
|
||||
this.entityId = props.entityId;
|
||||
|
||||
Reference in New Issue
Block a user