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 { RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
import { DriverId } from '../DriverId';
|
||||
import { RaceId } from '../RaceId';
|
||||
@@ -13,8 +13,7 @@ import { IncidentCount } from './IncidentCount';
|
||||
import { LapTime } from './LapTime';
|
||||
import { Position } from './Position';
|
||||
|
||||
export class Result implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class Result extends Entity<string> {
|
||||
readonly raceId: RaceId;
|
||||
readonly driverId: DriverId;
|
||||
readonly position: Position;
|
||||
@@ -31,7 +30,8 @@ export class Result implements Entity<string> {
|
||||
incidents: IncidentCount;
|
||||
startPosition: Position;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.raceId = props.raceId;
|
||||
this.driverId = props.driverId;
|
||||
this.position = props.position;
|
||||
|
||||
Reference in New Issue
Block a user