website refactor
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Enhanced Result entity with detailed incident tracking
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { RaceIncidents, type IncidentRecord } from '../value-objects/RaceIncidents';
|
||||
import { DriverId } from './DriverId';
|
||||
@@ -10,8 +10,7 @@ import { RaceId } from './RaceId';
|
||||
import { LapTime } from './result/LapTime';
|
||||
import { Position } from './result/Position';
|
||||
|
||||
export class ResultWithIncidents implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class ResultWithIncidents extends Entity<string> {
|
||||
readonly raceId: RaceId;
|
||||
readonly driverId: DriverId;
|
||||
readonly position: Position;
|
||||
@@ -28,7 +27,8 @@ export class ResultWithIncidents implements Entity<string> {
|
||||
incidents: RaceIncidents;
|
||||
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