website refactor
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
* Immutable aggregate root with factory methods and domain validation.
|
||||
*/
|
||||
|
||||
import { RacingDomainValidationError, RacingDomainInvariantError } from '../errors/RacingDomainError';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import type { Session } from './Session';
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainInvariantError, RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { SessionType } from '../value-objects/SessionType';
|
||||
import type { Session } from './Session';
|
||||
|
||||
export type RaceEventStatus = 'scheduled' | 'in_progress' | 'awaiting_stewarding' | 'closed' | 'cancelled';
|
||||
|
||||
@@ -280,4 +280,11 @@ export class RaceEvent implements Entity<string> {
|
||||
isClosed(): boolean {
|
||||
return this.status === 'closed';
|
||||
}
|
||||
|
||||
equals(other: Entity<string>): boolean {
|
||||
if (!(other instanceof RaceEvent)) {
|
||||
return false;
|
||||
}
|
||||
return this.id === other.id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user