website refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* Immutable entity with factory methods and domain validation.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainInvariantError, RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { MaxParticipants } from '../value-objects/MaxParticipants';
|
||||
import { ParticipantCount } from '../value-objects/ParticipantCount';
|
||||
@@ -15,8 +15,7 @@ import { StrengthOfField } from '../value-objects/StrengthOfField';
|
||||
|
||||
export type { RaceStatus, RaceStatusValue } from '../value-objects/RaceStatus';
|
||||
|
||||
export class Race implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class Race extends Entity<string> {
|
||||
readonly leagueId: string;
|
||||
readonly scheduledAt: Date;
|
||||
readonly track: string;
|
||||
@@ -60,7 +59,8 @@ export class Race implements Entity<string> {
|
||||
registeredCount?: ParticipantCount;
|
||||
maxParticipants?: MaxParticipants;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.leagueId = props.leagueId;
|
||||
this.scheduledAt = props.scheduledAt;
|
||||
this.track = props.track;
|
||||
|
||||
Reference in New Issue
Block a user