wip
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import type { IValueObject } from '@gridpilot/shared/domain';
|
||||
|
||||
export class LeagueTimezone {
|
||||
export interface LeagueTimezoneProps {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export class LeagueTimezone implements IValueObject<LeagueTimezoneProps> {
|
||||
private readonly id: string;
|
||||
|
||||
constructor(id: string) {
|
||||
@@ -13,4 +18,12 @@ export class LeagueTimezone {
|
||||
getId(): string {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
get props(): LeagueTimezoneProps {
|
||||
return { id: this.id };
|
||||
}
|
||||
|
||||
equals(other: IValueObject<LeagueTimezoneProps>): boolean {
|
||||
return this.props.id === other.props.id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user