inmemory to postgres

This commit is contained in:
2025-12-29 18:34:12 +01:00
parent 9e17d0752a
commit f5639a367f
176 changed files with 10175 additions and 468 deletions

View File

@@ -49,6 +49,22 @@ export class JoinRequest implements IEntity<string> {
});
}
static rehydrate(props: {
id: string;
leagueId: string;
driverId: string;
requestedAt: Date;
message?: string;
}): JoinRequest {
return new JoinRequest({
id: props.id,
leagueId: props.leagueId,
driverId: props.driverId,
requestedAt: props.requestedAt,
...(props.message !== undefined && { message: props.message }),
});
}
private static validate(props: JoinRequestProps): void {
if (!props.leagueId || props.leagueId.trim().length === 0) {
throw new RacingDomainValidationError('League ID is required');