This commit is contained in:
2025-12-04 23:31:55 +01:00
parent 9fa21a488a
commit fb509607c1
96 changed files with 5839 additions and 1609 deletions

View File

@@ -0,0 +1,29 @@
/**
* Domain Entity: Penalty
*
* Represents a season-long penalty or bonus applied to a driver
* within a specific league. This is intentionally simple for the
* alpha demo and models points adjustments only.
*/
export type PenaltyType = 'points-deduction' | 'points-bonus';
export interface Penalty {
id: string;
leagueId: string;
driverId: string;
type: PenaltyType;
/**
* Signed integer representing points adjustment:
* - negative for deductions
* - positive for bonuses
*/
pointsDelta: number;
/**
* Optional short reason/label (e.g. "Incident penalty", "Fastest laps bonus").
*/
reason?: string;
/**
* When this penalty was applied.
*/
appliedAt: Date;
}