This commit is contained in:
2025-12-17 01:23:09 +01:00
parent f01e01e50c
commit 4d890863d3
73 changed files with 2632 additions and 3224 deletions

View File

@@ -6,23 +6,27 @@ export interface LeagueTimezoneProps {
}
export class LeagueTimezone implements IValueObject<LeagueTimezoneProps> {
private readonly id: string;
readonly id: string;
constructor(id: string) {
if (!id || id.trim().length === 0) {
throw new RacingDomainValidationError('LeagueTimezone id must be a non-empty string');
}
private constructor(id: string) {
this.id = id;
}
getId(): string {
return this.id;
static create(id: string): LeagueTimezone {
if (!id || id.trim().length === 0) {
throw new RacingDomainValidationError('LeagueTimezone id must be a non-empty string');
}
return new LeagueTimezone(id.trim());
}
get props(): LeagueTimezoneProps {
return { id: this.id };
}
toString(): string {
return this.id;
}
equals(other: IValueObject<LeagueTimezoneProps>): boolean {
return this.props.id === other.props.id;
}