website refactor

This commit is contained in:
2026-01-16 16:46:57 +01:00
parent 37b1aa626c
commit 2f53727702
445 changed files with 1160 additions and 1150 deletions

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class CarId implements ValueObject<string> {
private constructor(private readonly value: string) {}
@@ -15,7 +15,7 @@ export class CarId implements ValueObject<string> {
return this.value;
}
equals(other: IValueObject<string>): boolean {
equals(other: ValueObject<string>): boolean {
return this.value === other.props;
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface DecalOverrideProps {
leagueId: string;
@@ -47,7 +47,7 @@ export class DecalOverride implements ValueObject<DecalOverrideProps> {
}
}
equals(other: IValueObject<DecalOverrideProps>): boolean {
equals(other: ValueObject<DecalOverrideProps>): boolean {
const a = this.props;
const b = other.props;
return (

View File

@@ -29,7 +29,7 @@ export class DriverName implements ValueObject<DriverNameProps> {
return new DriverName({ value: trimmed });
}
equals(other: IValueObject<DriverNameProps>): boolean {
equals(other: ValueObject<DriverNameProps>): boolean {
if (!(other instanceof DriverName)) {
return false;
}

View File

@@ -5,7 +5,7 @@
* Different sim racing games have different maximum grid sizes.
*/
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface GameConstraintsData {
readonly maxDrivers: number;
@@ -37,7 +37,7 @@ export class GameConstraints implements ValueObject<GameConstraintsProps> {
};
}
equals(other: IValueObject<GameConstraintsProps>): boolean {
equals(other: ValueObject<GameConstraintsProps>): boolean {
return this.props.gameId === other.props.gameId;
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class ImageUrl implements ValueObject<string> {
private constructor(private readonly value: string) {}
@@ -21,7 +21,7 @@ export class ImageUrl implements ValueObject<string> {
return this.value;
}
equals(other: IValueObject<string>): boolean {
equals(other: ValueObject<string>): boolean {
return this.props === other.props;
}

View File

@@ -5,7 +5,7 @@
*/
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface LeagueDescriptionValidationResult {
valid: boolean;
@@ -94,7 +94,7 @@ export class LeagueDescription implements ValueObject<LeagueDescriptionProps> {
return this.value;
}
equals(other: IValueObject<LeagueDescriptionProps>): boolean {
equals(other: ValueObject<LeagueDescriptionProps>): boolean {
return this.props.value === other.props.value;
}
}

View File

@@ -5,7 +5,7 @@
*/
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface LeagueNameValidationResult {
valid: boolean;
@@ -107,7 +107,7 @@ export class LeagueName implements ValueObject<LeagueNameProps> {
return this.value;
}
equals(other: IValueObject<LeagueNameProps>): boolean {
equals(other: ValueObject<LeagueNameProps>): boolean {
return this.props.value === other.props.value;
}
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface LeagueTimezoneProps {
id: string;
@@ -27,7 +27,7 @@ export class LeagueTimezone implements ValueObject<LeagueTimezoneProps> {
return this.id;
}
equals(other: IValueObject<LeagueTimezoneProps>): boolean {
equals(other: ValueObject<LeagueTimezoneProps>): boolean {
return this.props.id === other.props.id;
}
}

View File

@@ -5,7 +5,7 @@
* This is a hardened version that enforces strict business rules.
*/
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export type LeagueVisibilityType = 'ranked' | 'unranked';
@@ -157,7 +157,7 @@ export class LeagueVisibility implements ValueObject<LeagueVisibilityProps> {
return { type: this.type };
}
equals(other: IValueObject<LeagueVisibilityProps>): boolean {
equals(other: ValueObject<LeagueVisibilityProps>): boolean {
return this.props.type === other.props.type;
}
}

View File

@@ -4,7 +4,7 @@
*/
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export type DecalType = 'sponsor' | 'user';
@@ -165,7 +165,7 @@ export class LiveryDecal implements ValueObject<LiveryDecalProps> {
);
}
equals(other: IValueObject<LiveryDecalProps>): boolean {
equals(other: ValueObject<LiveryDecalProps>): boolean {
const a = this.props;
const b = other.props;
return (

View File

@@ -5,7 +5,7 @@
* Enforces reasonable limits and constraints.
*/
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export interface MaxParticipantsProps {
@@ -83,7 +83,7 @@ export class MaxParticipants implements ValueObject<MaxParticipantsProps> {
return { value: this.value };
}
equals(other: IValueObject<MaxParticipantsProps>): boolean {
equals(other: ValueObject<MaxParticipantsProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -6,7 +6,7 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { Money } from './Money';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export type MembershipFeeType = 'season' | 'monthly' | 'per_race';
@@ -64,7 +64,7 @@ export class MembershipFee implements ValueObject<MembershipFeeProps> {
return this.type === 'monthly';
}
equals(other: IValueObject<MembershipFeeProps>): boolean {
equals(other: ValueObject<MembershipFeeProps>): boolean {
const a = this.props;
const b = other.props;
return a.type === b.type && a.amount.equals(b.amount);

View File

@@ -3,7 +3,7 @@
* Represents a monetary amount with currency and platform fee calculation
*/
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export type Currency = 'USD' | 'EUR' | 'GBP';
@@ -102,7 +102,7 @@ export class Money implements ValueObject<MoneyProps> {
/**
* Check if this money equals another
*/
equals(other: IValueObject<MoneyProps>): boolean {
equals(other: ValueObject<MoneyProps>): boolean {
const a = this.props;
const b = other.props;
return a.amount === b.amount && a.currency === b.currency;

View File

@@ -1,7 +1,7 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import { ALL_WEEKDAYS } from '../types/Weekday';
import type { Weekday } from '../types/Weekday';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface MonthlyRecurrencePatternProps {
ordinal: 1 | 2 | 3 | 4;
@@ -57,7 +57,7 @@ export class MonthlyRecurrencePattern implements ValueObject<MonthlyRecurrencePa
};
}
equals(other: IValueObject<MonthlyRecurrencePatternProps>): boolean {
equals(other: ValueObject<MonthlyRecurrencePatternProps>): boolean {
const a = this.props;
const b = other.props;
return a.ordinal === b.ordinal && a.weekday === b.weekday;

View File

@@ -5,7 +5,7 @@
* Enforces constraints based on league visibility and other business rules.
*/
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export interface ParticipantCountProps {
@@ -107,7 +107,7 @@ export class ParticipantCount implements ValueObject<ParticipantCountProps> {
return { value: this.value };
}
equals(other: IValueObject<ParticipantCountProps>): boolean {
equals(other: ValueObject<ParticipantCountProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export class Points implements ValueObject<{ value: number }> {

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface PointsTableProps {
pointsByPosition: ReadonlyMap<number, number>;
@@ -31,7 +31,7 @@ export class PointsTable implements ValueObject<PointsTableProps> {
};
}
equals(other: IValueObject<PointsTableProps>): boolean {
equals(other: ValueObject<PointsTableProps>): boolean {
const a = this.props.pointsByPosition;
const b = other.props.pointsByPosition;

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
/**
* Incident types that can occur during a race
@@ -136,7 +136,7 @@ export class RaceIncidents implements ValueObject<IncidentRecord[]> {
return typeSummary.length > 0 ? `${total} incidents (${typeSummary})` : `${total} incidents`;
}
equals(other: IValueObject<IncidentRecord[]>): boolean {
equals(other: ValueObject<IncidentRecord[]>): boolean {
const otherIncidents = other.props;
if (this.incidents.length !== otherIncidents.length) {
return false;

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface RaceNameProps {
value: string;
@@ -32,7 +32,7 @@ export class RaceName implements ValueObject<RaceNameProps> {
return this.props.value;
}
public equals(other: IValueObject<RaceNameProps>): boolean {
public equals(other: ValueObject<RaceNameProps>): boolean {
return this.props.value === other.props.value;
}
}

View File

@@ -4,7 +4,7 @@
* Represents the status of a race with strict lifecycle rules.
*/
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export type RaceStatusValue = 'scheduled' | 'running' | 'completed' | 'cancelled';
@@ -118,7 +118,7 @@ export class RaceStatus implements ValueObject<RaceStatusProps> {
return { value: this.value };
}
equals(other: IValueObject<RaceStatusProps>): boolean {
equals(other: ValueObject<RaceStatusProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface RaceTimeOfDayProps {
hour: number;
@@ -47,7 +47,7 @@ export class RaceTimeOfDay implements ValueObject<RaceTimeOfDayProps> {
return `${hh}:${mm}`;
}
equals(other: IValueObject<RaceTimeOfDayProps>): boolean {
equals(other: ValueObject<RaceTimeOfDayProps>): boolean {
const a = this.props;
const b = other.props;
return a.hour === b.hour && a.minute === b.minute;

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { WeekdaySet } from './WeekdaySet';
import { MonthlyRecurrencePattern } from './MonthlyRecurrencePattern';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
@@ -64,7 +64,7 @@ export class RecurrenceStrategy implements ValueObject<RecurrenceStrategyProps>
});
}
equals(other: IValueObject<RecurrenceStrategyProps>): boolean {
equals(other: ValueObject<RecurrenceStrategyProps>): boolean {
const otherProps = other.props;
if (this.strategy.kind !== otherProps.kind) {
return false;

View File

@@ -1,7 +1,7 @@
import { LeagueTimezone } from './LeagueTimezone';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface ScheduledRaceSlotProps {
roundNumber: number;
@@ -35,7 +35,7 @@ export class ScheduledRaceSlot implements ValueObject<ScheduledRaceSlotProps> {
};
}
equals(other: IValueObject<ScheduledRaceSlotProps>): boolean {
equals(other: ValueObject<ScheduledRaceSlotProps>): boolean {
const a = this.props;
const b = other.props;
return (

View File

@@ -4,7 +4,6 @@ import {
RacingDomainValidationError,
} from '../errors/RacingDomainError';
import {
SeasonDropPolicy,
type SeasonDropStrategy,
} from './SeasonDropPolicy';

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export type SeasonDropStrategy = 'none' | 'bestNResults' | 'dropWorstN';
@@ -51,7 +51,7 @@ export class SeasonDropPolicy implements ValueObject<SeasonDropPolicyProps> {
};
}
equals(other: IValueObject<SeasonDropPolicyProps>): boolean {
equals(other: ValueObject<SeasonDropPolicyProps>): boolean {
const a = this.props;
const b = other.props;
return a.strategy === b.strategy && a.n === b.n;

View File

@@ -2,7 +2,7 @@ import { RaceTimeOfDay } from './RaceTimeOfDay';
import { LeagueTimezone } from './LeagueTimezone';
import type { RecurrenceStrategy } from './RecurrenceStrategy';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface SeasonScheduleProps {
startDate: Date;
@@ -54,7 +54,7 @@ export class SeasonSchedule implements ValueObject<SeasonScheduleProps> {
};
}
equals(other: IValueObject<SeasonScheduleProps>): boolean {
equals(other: ValueObject<SeasonScheduleProps>): boolean {
const a = this.props;
const b = other.props;
return (

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
/**
* Value Object: SeasonScoringConfig
@@ -55,7 +55,7 @@ export class SeasonScoringConfig
};
}
equals(other: IValueObject<SeasonScoringConfigProps>): boolean {
equals(other: ValueObject<SeasonScoringConfigProps>): boolean {
const a = this.props;
const b = other.props;
return (

View File

@@ -4,7 +4,7 @@
* Represents the status of a season with strict lifecycle rules.
*/
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export type SeasonStatusValue = 'planned' | 'active' | 'completed' | 'archived' | 'cancelled';
@@ -126,7 +126,7 @@ export class SeasonStatus implements ValueObject<SeasonStatusProps> {
return { value: this.value };
}
equals(other: IValueObject<SeasonStatusProps>): boolean {
equals(other: ValueObject<SeasonStatusProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import type { StewardingDecisionMode } from '../entities/League';
export interface SeasonStewardingConfigProps {
@@ -124,7 +124,7 @@ export class SeasonStewardingConfig
};
}
equals(other: IValueObject<SeasonStewardingConfigProps>): boolean {
equals(other: ValueObject<SeasonStewardingConfigProps>): boolean {
const a = this.props;
const b = other.props;
return (

View File

@@ -5,7 +5,7 @@
* Enforces reasonable limits for different session types.
*/
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export interface SessionDurationProps {
@@ -84,7 +84,7 @@ export class SessionDuration implements ValueObject<SessionDurationProps> {
return { value: this.value };
}
equals(other: IValueObject<SessionDurationProps>): boolean {
equals(other: ValueObject<SessionDurationProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
/**
* Value Object: SessionType
@@ -28,7 +28,7 @@ export class SessionType implements ValueObject<SessionTypeValue> {
return this.value;
}
equals(other: IValueObject<SessionTypeValue>): boolean {
equals(other: ValueObject<SessionTypeValue>): boolean {
return this.value === other.props;
}

View File

@@ -6,7 +6,7 @@
*/
import { Money } from './Money';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface SponsorshipSlotConfig {
tier: 'main' | 'secondary';
@@ -45,7 +45,7 @@ export class SponsorshipPricing implements ValueObject<SponsorshipPricingProps>
};
}
equals(other: IValueObject<SponsorshipPricingProps>): boolean {
equals(other: ValueObject<SponsorshipPricingProps>): boolean {
const a = this.props;
const b = other.props;

View File

@@ -5,7 +5,7 @@
* Enforces valid range and provides domain-specific operations.
*/
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export interface StrengthOfFieldProps {
@@ -68,7 +68,7 @@ export class StrengthOfField implements ValueObject<StrengthOfFieldProps> {
return this.value;
}
equals(other: IValueObject<StrengthOfFieldProps>): boolean {
equals(other: ValueObject<StrengthOfFieldProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TeamCreatedAt implements ValueObject<Date> {
private constructor(private readonly value: Date) {}
@@ -20,7 +20,7 @@ export class TeamCreatedAt implements ValueObject<Date> {
return new Date(this.value);
}
equals(other: IValueObject<Date>): boolean {
equals(other: ValueObject<Date>): boolean {
return this.value.getTime() === other.props.getTime();
}
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TeamDescription implements ValueObject<string> {
private constructor(private readonly value: string) {}
@@ -19,7 +19,7 @@ export class TeamDescription implements ValueObject<string> {
return this.value;
}
equals(other: IValueObject<string>): boolean {
equals(other: ValueObject<string>): boolean {
return this.value === other.props;
}
}

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export interface TeamDrivingReasonCodeProps {
@@ -62,7 +62,7 @@ export class TeamDrivingReasonCode implements ValueObject<TeamDrivingReasonCodeP
return { value: this.value };
}
equals(other: IValueObject<TeamDrivingReasonCodeProps>): boolean {
equals(other: ValueObject<TeamDrivingReasonCodeProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TeamName implements ValueObject<string> {
private constructor(private readonly value: string) {}
@@ -19,7 +19,7 @@ export class TeamName implements ValueObject<string> {
return this.value;
}
equals(other: IValueObject<string>): boolean {
equals(other: ValueObject<string>): boolean {
return this.value === other.props;
}
}

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
/**
* Value Object: TeamRating
@@ -90,7 +90,7 @@ export class TeamRating implements ValueObject<TeamRatingProps> {
return new TeamRating(props);
}
equals(other: IValueObject<TeamRatingProps>): boolean {
equals(other: ValueObject<TeamRatingProps>): boolean {
return this.props.teamId === other.props.teamId;
}

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export interface TeamRatingDeltaProps {
@@ -31,7 +31,7 @@ export class TeamRatingDelta implements ValueObject<TeamRatingDeltaProps> {
return { value: this.value };
}
equals(other: IValueObject<TeamRatingDeltaProps>): boolean {
equals(other: ValueObject<TeamRatingDeltaProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export interface TeamRatingDimensionKeyProps {
@@ -39,7 +39,7 @@ export class TeamRatingDimensionKey implements ValueObject<TeamRatingDimensionKe
return { value: this.value };
}
equals(other: IValueObject<TeamRatingDimensionKeyProps>): boolean {
equals(other: ValueObject<TeamRatingDimensionKeyProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
// Simple UUID v4 generator
@@ -52,7 +52,7 @@ export class TeamRatingEventId implements ValueObject<TeamRatingEventIdProps> {
return { value: this.value };
}
equals(other: IValueObject<TeamRatingEventIdProps>): boolean {
equals(other: ValueObject<TeamRatingEventIdProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,4 +1,4 @@
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
export interface TeamRatingValueProps {
@@ -30,7 +30,7 @@ export class TeamRatingValue implements ValueObject<TeamRatingValueProps> {
return { value: this.value };
}
equals(other: IValueObject<TeamRatingValueProps>): boolean {
equals(other: ValueObject<TeamRatingValueProps>): boolean {
return this.value === other.props.value;
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TeamTag implements ValueObject<string> {
private constructor(private readonly value: string) {}
@@ -19,7 +19,7 @@ export class TeamTag implements ValueObject<string> {
return this.value;
}
equals(other: IValueObject<string>): boolean {
equals(other: ValueObject<string>): boolean {
return this.value === other.props;
}
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TrackCountry implements ValueObject<string> {
private constructor(private readonly value: string) {}
@@ -19,7 +19,7 @@ export class TrackCountry implements ValueObject<string> {
return this.value;
}
equals(other: IValueObject<string>): boolean {
equals(other: ValueObject<string>): boolean {
return this.value === other.props;
}
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TrackGameId implements ValueObject<string> {
private constructor(private readonly value: string) {}
@@ -19,7 +19,7 @@ export class TrackGameId implements ValueObject<string> {
return this.value;
}
equals(other: IValueObject<string>): boolean {
equals(other: ValueObject<string>): boolean {
return this.value === other.props;
}
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TrackImageUrl implements ValueObject<string | undefined> {
private constructor(private readonly value: string | undefined) {}
@@ -20,7 +20,7 @@ export class TrackImageUrl implements ValueObject<string | undefined> {
return this.value;
}
equals(other: IValueObject<string | undefined>): boolean {
equals(other: ValueObject<string | undefined>): boolean {
return this.value === other.props;
}
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TrackLength implements ValueObject<number> {
private constructor(private readonly value: number) {}
@@ -19,7 +19,7 @@ export class TrackLength implements ValueObject<number> {
return this.value;
}
equals(other: IValueObject<number>): boolean {
equals(other: ValueObject<number>): boolean {
return this.value === other.props;
}
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TrackShortName implements ValueObject<string> {
private constructor(private readonly value: string) {}
@@ -19,7 +19,7 @@ export class TrackShortName implements ValueObject<string> {
return this.value;
}
equals(other: IValueObject<string>): boolean {
equals(other: ValueObject<string>): boolean {
return this.value === other.props;
}
}

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export class TrackTurns implements ValueObject<number> {
private constructor(private readonly value: number) {}
@@ -19,7 +19,7 @@ export class TrackTurns implements ValueObject<number> {
return this.value;
}
equals(other: IValueObject<number>): boolean {
equals(other: ValueObject<number>): boolean {
return this.value === other.props;
}
}

View File

@@ -1,7 +1,7 @@
import type { Weekday } from '../types/Weekday';
import { weekdayToIndex } from '../types/Weekday';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface WeekdaySetProps {
days: Weekday[];
@@ -35,7 +35,7 @@ export class WeekdaySet implements ValueObject<WeekdaySetProps> {
return this.days.includes(day);
}
equals(other: IValueObject<WeekdaySetProps>): boolean {
equals(other: ValueObject<WeekdaySetProps>): boolean {
const a = this.props.days;
const b = other.props.days;
if (a.length !== b.length) return false;

View File

@@ -1,5 +1,5 @@
import { RacingDomainValidationError } from '../../errors/RacingDomainError';
import type { ValueObject } from '@core/shared/domain';
import type { ValueObject } from '@core/shared/domain/ValueObject';
export interface DriverIdProps {
value: string;
@@ -19,7 +19,7 @@ export class DriverId implements ValueObject<DriverIdProps> {
return this.value;
}
equals(other: IValueObject<DriverIdProps>): boolean {
equals(other: ValueObject<DriverIdProps>): boolean {
return this.props.value === other.props.value;
}