website refactor
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Represents a registration of a driver for a specific race.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { DriverId } from './DriverId';
|
||||
import { RaceId } from './RaceId';
|
||||
@@ -17,9 +17,8 @@ export interface RaceRegistrationProps {
|
||||
registeredAt?: Date;
|
||||
}
|
||||
|
||||
export class RaceRegistration implements Entity<string> {
|
||||
readonly id: string;
|
||||
readonly raceId: RaceId;
|
||||
export class RaceRegistration extends Entity<string> {
|
||||
readonly raceId: RaceId;
|
||||
readonly driverId: DriverId;
|
||||
readonly registeredAt: RegisteredAt;
|
||||
|
||||
@@ -29,7 +28,8 @@ export class RaceRegistration implements Entity<string> {
|
||||
driverId: DriverId;
|
||||
registeredAt: RegisteredAt;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.raceId = props.raceId;
|
||||
this.driverId = props.driverId;
|
||||
this.registeredAt = props.registeredAt;
|
||||
|
||||
Reference in New Issue
Block a user