code quality
Some checks failed
CI / lint-typecheck (pull_request) Failing after 12s
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
Some checks failed
CI / lint-typecheck (pull_request) Failing after 12s
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:
@@ -1,3 +1,18 @@
|
||||
export interface ScoringSystem {
|
||||
// Define scoring system properties based on your domain
|
||||
// This is a placeholder - adjust based on actual scoring system structure
|
||||
pointsPerPosition?: Record<number, number>;
|
||||
bonusPoints?: {
|
||||
polePosition?: number;
|
||||
fastestLap?: number;
|
||||
cleanRace?: number;
|
||||
};
|
||||
penalties?: {
|
||||
timePenalty?: number;
|
||||
pointsDeduction?: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface LeagueCreateCommand {
|
||||
name: string;
|
||||
description?: string;
|
||||
@@ -16,7 +31,7 @@ export interface LeagueCreateCommand {
|
||||
tracks?: string[];
|
||||
|
||||
// Scoring
|
||||
scoringSystem?: any;
|
||||
scoringSystem?: ScoringSystem;
|
||||
bonusPointsEnabled: boolean;
|
||||
penaltiesEnabled: boolean;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { ScoringSystem } from './LeagueCreateCommand';
|
||||
|
||||
export interface LeagueCreatedEvent {
|
||||
type: 'LeagueCreatedEvent';
|
||||
leagueId: string;
|
||||
@@ -5,10 +7,33 @@ export interface LeagueCreatedEvent {
|
||||
timestamp: Date;
|
||||
}
|
||||
|
||||
export interface LeagueUpdates {
|
||||
name?: string;
|
||||
description?: string;
|
||||
visibility?: 'public' | 'private';
|
||||
maxDrivers?: number;
|
||||
approvalRequired?: boolean;
|
||||
lateJoinAllowed?: boolean;
|
||||
raceFrequency?: string;
|
||||
raceDay?: string;
|
||||
raceTime?: string;
|
||||
tracks?: string[];
|
||||
scoringSystem?: ScoringSystem;
|
||||
bonusPointsEnabled?: boolean;
|
||||
penaltiesEnabled?: boolean;
|
||||
protestsEnabled?: boolean;
|
||||
appealsEnabled?: boolean;
|
||||
stewardTeam?: string[];
|
||||
gameType?: string;
|
||||
skillLevel?: string;
|
||||
category?: string;
|
||||
tags?: string[];
|
||||
}
|
||||
|
||||
export interface LeagueUpdatedEvent {
|
||||
type: 'LeagueUpdatedEvent';
|
||||
leagueId: string;
|
||||
updates: Partial<any>;
|
||||
updates: Partial<LeagueUpdates>;
|
||||
timestamp: Date;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { ScoringSystem } from './LeagueCreateCommand';
|
||||
|
||||
export interface LeagueData {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -20,7 +22,7 @@ export interface LeagueData {
|
||||
tracks: string[] | null;
|
||||
|
||||
// Scoring
|
||||
scoringSystem: any | null;
|
||||
scoringSystem: ScoringSystem | null;
|
||||
bonusPointsEnabled: boolean;
|
||||
penaltiesEnabled: boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user