website refactor
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* Includes user-placed decals and league-specific overrides.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
|
||||
import { RacingDomainInvariantError, RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { CarId } from '../value-objects/CarId';
|
||||
@@ -28,8 +28,7 @@ export interface DriverLiveryProps {
|
||||
validatedAt: Date | undefined;
|
||||
}
|
||||
|
||||
export class DriverLivery implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class DriverLivery extends Entity<string> {
|
||||
readonly driverId: DriverId;
|
||||
readonly gameId: GameId;
|
||||
readonly carId: CarId;
|
||||
@@ -41,7 +40,8 @@ export class DriverLivery implements Entity<string> {
|
||||
readonly validatedAt: Date | undefined;
|
||||
|
||||
private constructor(props: DriverLiveryProps) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.driverId = props.driverId;
|
||||
this.gameId = props.gameId;
|
||||
this.carId = props.carId;
|
||||
|
||||
Reference in New Issue
Block a user