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

@@ -4,7 +4,7 @@
* Represents a request to join a league.
*/
import type { Entity } from '@core/shared/domain/Entity';
import { Entity } from '@core/shared/domain/Entity';
import { RacingDomainValidationError } from '../errors/RacingDomainError';
import { JoinedAt } from '../value-objects/JoinedAt';
import { LeagueId } from './LeagueId';
@@ -18,15 +18,15 @@ export interface JoinRequestProps {
message?: string;
}
export class JoinRequest implements Entity<string> {
readonly id: string;
export class JoinRequest extends Entity<string> {
readonly leagueId: LeagueId;
readonly driverId: LeagueOwnerId;
readonly requestedAt: JoinedAt;
readonly message: string | undefined;
private constructor(props: { id: string; leagueId: string; driverId: string; requestedAt: Date; message?: string }) {
this.id = props.id;
super(props.id);
this.leagueId = LeagueId.create(props.leagueId);
this.driverId = LeagueOwnerId.create(props.driverId);
this.requestedAt = JoinedAt.create(props.requestedAt);