website refactor
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
* Represents a registration of a driver for a specific race.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { RaceId } from './RaceId';
|
||||
import { DriverId } from './DriverId';
|
||||
import { RaceId } from './RaceId';
|
||||
import { RegisteredAt } from './RegisteredAt';
|
||||
|
||||
export interface RaceRegistrationProps {
|
||||
@@ -73,4 +73,11 @@ export class RaceRegistration implements Entity<string> {
|
||||
throw new RacingDomainValidationError('Driver ID is required');
|
||||
}
|
||||
}
|
||||
|
||||
equals(other: Entity<string>): boolean {
|
||||
if (!(other instanceof RaceRegistration)) {
|
||||
return false;
|
||||
}
|
||||
return this.id === other.id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user