website refactor
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import { MediaReference } from '@core/domain/media/MediaReference';
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { CountryCode } from '../value-objects/CountryCode';
|
||||
import { DriverBio } from '../value-objects/driver/DriverBio';
|
||||
@@ -14,8 +14,7 @@ import { DriverName } from '../value-objects/driver/DriverName';
|
||||
import { JoinedAt } from '../value-objects/JoinedAt';
|
||||
import { IRacingId } from '../value-objects/RacingId';
|
||||
|
||||
export class Driver implements Entity<string> {
|
||||
readonly id: string;
|
||||
export class Driver extends Entity<string> {
|
||||
readonly iracingId: IRacingId;
|
||||
readonly name: DriverName;
|
||||
readonly country: CountryCode;
|
||||
@@ -34,7 +33,8 @@ export class Driver implements Entity<string> {
|
||||
category?: string;
|
||||
avatarRef: MediaReference;
|
||||
}) {
|
||||
this.id = props.id;
|
||||
super(props.id);
|
||||
|
||||
this.iracingId = props.iracingId;
|
||||
this.name = props.name;
|
||||
this.country = props.country;
|
||||
|
||||
Reference in New Issue
Block a user