integration tests
Some checks failed
CI / lint-typecheck (pull_request) Failing after 4m50s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped

This commit is contained in:
2026-01-23 11:44:59 +01:00
parent a0f41f242f
commit 6df38a462a
125 changed files with 4712 additions and 19184 deletions

View File

@@ -88,4 +88,29 @@ export class Track extends Entity<string> {
gameId: TrackGameId.create(props.gameId),
});
}
}
update(props: Partial<{
name: string;
shortName: string;
country: string;
category: TrackCategory;
difficulty: TrackDifficulty;
lengthKm: number;
turns: number;
imageUrl: string;
gameId: string;
}>): Track {
return new Track({
id: this.id,
name: props.name ? TrackName.create(props.name) : this.name,
shortName: props.shortName ? TrackShortName.create(props.shortName) : this.shortName,
country: props.country ? TrackCountry.create(props.country) : this.country,
category: props.category ?? this.category,
difficulty: props.difficulty ?? this.difficulty,
lengthKm: props.lengthKm ? TrackLength.create(props.lengthKm) : this.lengthKm,
turns: props.turns ? TrackTurns.create(props.turns) : this.turns,
imageUrl: props.imageUrl ? TrackImageUrl.create(props.imageUrl) : this.imageUrl,
gameId: props.gameId ? TrackGameId.create(props.gameId) : this.gameId,
});
}
}