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

@@ -62,6 +62,24 @@ export class Driver implements IEntity<string> {
});
}
static rehydrate(props: {
id: string;
iracingId: string;
name: string;
country: string;
bio?: string;
joinedAt: Date;
}): Driver {
return new Driver({
id: props.id,
iracingId: IRacingId.create(props.iracingId),
name: DriverName.create(props.name),
country: CountryCode.create(props.country),
...(props.bio !== undefined ? { bio: DriverBio.create(props.bio) } : {}),
joinedAt: JoinedAt.create(props.joinedAt),
});
}
/**
* Create a copy with updated properties
*/