website refactor
This commit is contained in:
@@ -5,21 +5,21 @@
|
||||
* Penalties can be applied as a result of an upheld protest or directly by stewards.
|
||||
*/
|
||||
|
||||
import { RacingDomainValidationError, RacingDomainInvariantError } from '../../errors/RacingDomainError';
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import { PenaltyId } from './PenaltyId';
|
||||
import { LeagueId } from '../LeagueId';
|
||||
import { RaceId } from '../RaceId';
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainInvariantError, RacingDomainValidationError } from '../../errors/RacingDomainError';
|
||||
import { AppliedAt } from '../AppliedAt';
|
||||
import { DriverId } from '../DriverId';
|
||||
import { IssuedAt } from '../IssuedAt';
|
||||
import { LeagueId } from '../LeagueId';
|
||||
import { ProtestId } from '../ProtestId';
|
||||
import { RaceId } from '../RaceId';
|
||||
import { StewardId } from '../StewardId';
|
||||
import { PenaltyId } from './PenaltyId';
|
||||
import { PenaltyNotes } from './PenaltyNotes';
|
||||
import { PenaltyReason } from './PenaltyReason';
|
||||
import { PenaltyStatus } from './PenaltyStatus';
|
||||
import { PenaltyType, type PenaltyTypeValue } from './PenaltyType';
|
||||
import { PenaltyValue } from './PenaltyValue';
|
||||
import { PenaltyReason } from './PenaltyReason';
|
||||
import { ProtestId } from '../ProtestId';
|
||||
import { StewardId } from '../StewardId';
|
||||
import { PenaltyStatus } from './PenaltyStatus';
|
||||
import { IssuedAt } from '../IssuedAt';
|
||||
import { AppliedAt } from '../AppliedAt';
|
||||
import { PenaltyNotes } from './PenaltyNotes';
|
||||
|
||||
export interface PenaltyProps {
|
||||
id: PenaltyId;
|
||||
@@ -239,4 +239,11 @@ export class Penalty implements Entity<string> {
|
||||
return 'Penalty';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
equals(other: Entity<string>): boolean {
|
||||
if (!(other instanceof Penalty)) {
|
||||
return false;
|
||||
}
|
||||
return this.id === other.id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user