This commit is contained in:
2025-12-10 12:38:55 +01:00
parent 0f7fe67d3c
commit fbbcf414a4
87 changed files with 11972 additions and 390 deletions

View File

@@ -18,6 +18,7 @@ export interface DecalOverride {
export interface DriverLiveryProps {
id: string;
driverId: string;
gameId: string;
carId: string;
uploadedImageUrl: string;
userDecals: LiveryDecal[];
@@ -30,6 +31,7 @@ export interface DriverLiveryProps {
export class DriverLivery {
readonly id: string;
readonly driverId: string;
readonly gameId: string;
readonly carId: string;
readonly uploadedImageUrl: string;
readonly userDecals: LiveryDecal[];
@@ -41,6 +43,7 @@ export class DriverLivery {
private constructor(props: DriverLiveryProps) {
this.id = props.id;
this.driverId = props.driverId;
this.gameId = props.gameId;
this.carId = props.carId;
this.uploadedImageUrl = props.uploadedImageUrl;
this.userDecals = props.userDecals;
@@ -74,6 +77,10 @@ export class DriverLivery {
throw new Error('DriverLivery driverId is required');
}
if (!props.gameId || props.gameId.trim().length === 0) {
throw new Error('DriverLivery gameId is required');
}
if (!props.carId || props.carId.trim().length === 0) {
throw new Error('DriverLivery carId is required');
}