website refactor
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
* Immutable entity with factory methods and domain validation.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import { RaceId } from '../RaceId';
|
||||
import { DriverId } from '../DriverId';
|
||||
import { Position } from './Position';
|
||||
import { LapTime } from './LapTime';
|
||||
import { RaceId } from '../RaceId';
|
||||
import { IncidentCount } from './IncidentCount';
|
||||
import { LapTime } from './LapTime';
|
||||
import { Position } from './Position';
|
||||
|
||||
export class Result implements Entity<string> {
|
||||
readonly id: string;
|
||||
@@ -121,6 +121,13 @@ export class Result implements Entity<string> {
|
||||
}
|
||||
}
|
||||
|
||||
equals(other: Entity<string>): boolean {
|
||||
if (!(other instanceof Result)) {
|
||||
return false;
|
||||
}
|
||||
return this.id === other.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate positions gained/lost
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user