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

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