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 { CarClass, CarClassType } from './CarClass';
|
||||
import { CarId } from './CarId';
|
||||
@@ -18,8 +18,7 @@ import { Manufacturer } from './Manufacturer';
|
||||
import { Weight } from './Weight';
|
||||
import { Year } from './Year';
|
||||
|
||||
export class Car implements Entity<CarId> {
|
||||
readonly id: CarId;
|
||||
export class Car extends Entity<CarId> {
|
||||
readonly name: CarName;
|
||||
readonly shortName: string;
|
||||
readonly manufacturer: Manufacturer;
|
||||
@@ -44,7 +43,8 @@ export class Car implements Entity<CarId> {
|
||||
imageUrl?: ImageUrl;
|
||||
gameId: GameId;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.name = props.name;
|
||||
this.shortName = props.shortName;
|
||||
this.manufacturer = props.manufacturer;
|
||||
|
||||
Reference in New Issue
Block a user