This commit is contained in:
2025-12-12 14:23:40 +01:00
parent 6a88fe93ab
commit 2cd3bfbb47
58 changed files with 2866 additions and 260 deletions

View File

@@ -19,9 +19,9 @@ export interface PrizeProps {
driverId?: string;
status: PrizeStatus;
createdAt: Date;
awardedAt?: Date;
paidAt?: Date;
description?: string;
awardedAt: Date | undefined;
paidAt: Date | undefined;
description: string | undefined;
}
export class Prize implements IEntity<string> {
@@ -29,12 +29,12 @@ export class Prize implements IEntity<string> {
readonly seasonId: string;
readonly position: number;
readonly amount: Money;
readonly driverId?: string;
readonly driverId: string | undefined;
readonly status: PrizeStatus;
readonly createdAt: Date;
readonly awardedAt?: Date;
readonly paidAt?: Date;
readonly description?: string;
readonly awardedAt: Date | undefined;
readonly paidAt: Date | undefined;
readonly description: string | undefined;
private constructor(props: PrizeProps) {
this.id = props.id;
@@ -43,7 +43,7 @@ export class Prize implements IEntity<string> {
this.amount = props.amount;
this.driverId = props.driverId;
this.status = props.status;
this.createdAt = props.createdAt;
this.createdAt = props.createdAt ?? new Date();
this.awardedAt = props.awardedAt;
this.paidAt = props.paidAt;
this.description = props.description;