fix issues in core

This commit is contained in:
2025-12-23 11:25:08 +01:00
parent 1efd971032
commit 2854ae3c5c
113 changed files with 1142 additions and 458 deletions

View File

@@ -94,23 +94,26 @@ export class Protest implements IEntity<string> {
const defenseRequestedAt = props.defenseRequestedAt ? DefenseRequestedAt.create(props.defenseRequestedAt) : undefined;
const defenseRequestedBy = props.defenseRequestedBy ? StewardId.create(props.defenseRequestedBy) : undefined;
return new Protest({
const protestProps: ProtestProps = {
id,
raceId,
protestingDriverId,
accusedDriverId,
incident,
comment,
proofVideoUrl,
status,
reviewedBy,
decisionNotes,
filedAt,
reviewedAt,
defense,
defenseRequestedAt,
defenseRequestedBy,
});
};
if (comment !== undefined) protestProps.comment = comment;
if (proofVideoUrl !== undefined) protestProps.proofVideoUrl = proofVideoUrl;
if (reviewedBy !== undefined) protestProps.reviewedBy = reviewedBy;
if (decisionNotes !== undefined) protestProps.decisionNotes = decisionNotes;
if (reviewedAt !== undefined) protestProps.reviewedAt = reviewedAt;
if (defense !== undefined) protestProps.defense = defense;
if (defenseRequestedAt !== undefined) protestProps.defenseRequestedAt = defenseRequestedAt;
if (defenseRequestedBy !== undefined) protestProps.defenseRequestedBy = defenseRequestedBy;
return new Protest(protestProps);
}
get id(): string { return this.props.id.toString(); }