wip
This commit is contained in:
29
packages/racing/domain/entities/Penalty.ts
Normal file
29
packages/racing/domain/entities/Penalty.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user