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 { TrackCountry } from '../value-objects/TrackCountry';
|
||||
import { TrackGameId } from '../value-objects/TrackGameId';
|
||||
@@ -18,8 +18,7 @@ import { TrackTurns } from '../value-objects/TrackTurns';
|
||||
export type TrackCategory = 'oval' | 'road' | 'street' | 'dirt';
|
||||
export type TrackDifficulty = 'beginner' | 'intermediate' | 'advanced' | 'expert';
|
||||
|
||||
export class Track implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class Track extends Entity<string> {
|
||||
readonly name: TrackName;
|
||||
readonly shortName: TrackShortName;
|
||||
readonly country: TrackCountry;
|
||||
@@ -42,7 +41,8 @@ export class Track implements Entity<string> {
|
||||
imageUrl: TrackImageUrl;
|
||||
gameId: TrackGameId;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.name = props.name;
|
||||
this.shortName = props.shortName;
|
||||
this.country = props.country;
|
||||
|
||||
Reference in New Issue
Block a user