website refactor
This commit is contained in:
@@ -5,14 +5,13 @@
|
||||
* 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 type { SessionType } from '../value-objects/SessionType';
|
||||
|
||||
export type SessionStatus = 'scheduled' | 'running' | 'completed' | 'cancelled';
|
||||
|
||||
export class Session implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class Session extends Entity<string> {
|
||||
readonly raceEventId: string;
|
||||
readonly scheduledAt: Date;
|
||||
readonly track: string;
|
||||
@@ -39,7 +38,8 @@ export class Session implements Entity<string> {
|
||||
registeredCount?: number;
|
||||
maxParticipants?: number;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.raceEventId = props.raceEventId;
|
||||
this.scheduledAt = props.scheduledAt;
|
||||
this.track = props.track;
|
||||
|
||||
Reference in New Issue
Block a user