website refactor
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
* Represents a request to join a league.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@core/shared/domain';
|
||||
import type { Entity } from '@core/shared/domain/Entity';
|
||||
import { RacingDomainValidationError } from '../errors/RacingDomainError';
|
||||
import { JoinedAt } from '../value-objects/JoinedAt';
|
||||
import { LeagueId } from './LeagueId';
|
||||
import { LeagueOwnerId } from './LeagueOwnerId';
|
||||
import { JoinedAt } from '../value-objects/JoinedAt';
|
||||
|
||||
export interface JoinRequestProps {
|
||||
id?: string;
|
||||
@@ -74,4 +74,11 @@ export class JoinRequest implements Entity<string> {
|
||||
throw new RacingDomainValidationError('Driver ID is required');
|
||||
}
|
||||
}
|
||||
|
||||
equals(other: Entity<string>): boolean {
|
||||
if (!(other instanceof JoinRequest)) {
|
||||
return false;
|
||||
}
|
||||
return this.id === other.id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user