website refactor
This commit is contained in:
@@ -5,14 +5,14 @@
|
||||
* Immutable entity with factory methods and domain validation.
|
||||
*/
|
||||
|
||||
import { MediaReference } from '@core/domain/media/MediaReference';
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import { RacingId } from '../value-objects/RacingId';
|
||||
import { DriverName } from '../value-objects/driver/DriverName';
|
||||
import { CountryCode } from '../value-objects/CountryCode';
|
||||
import { DriverBio } from '../value-objects/driver/DriverBio';
|
||||
import { DriverName } from '../value-objects/driver/DriverName';
|
||||
import { JoinedAt } from '../value-objects/JoinedAt';
|
||||
import { MediaReference } from '@core/domain/media/MediaReference';
|
||||
import { IRacingId } from '../value-objects/RacingId';
|
||||
|
||||
export class Driver implements Entity<string> {
|
||||
readonly id: string;
|
||||
@@ -170,4 +170,11 @@ export class Driver implements Entity<string> {
|
||||
|
||||
return new Driver(driverProps);
|
||||
}
|
||||
|
||||
equals(other: Entity<string>): boolean {
|
||||
if (!(other instanceof Driver)) {
|
||||
return false;
|
||||
}
|
||||
return this.id === other.id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user