Files
gridpilot.gg/core/racing/application/use-cases/RankingUseCase.ts
2026-01-16 23:44:37 +01:00

31 lines
888 B
TypeScript

/**
* Application Use Case Interface: RankingUseCase
*
* Use case for computing driver rankings from standings and results.
* This is an application layer concern that orchestrates domain data.
*/
import type { StandingRepository } from '../../domain/repositories/StandingRepository';
import type { DriverRepository } from '../../domain/repositories/DriverRepository';
import type { Logger } from '@core/shared/domain/Logger';
export interface DriverRanking {
driverId: string;
rating: number;
wins: number;
totalRaces: number;
overallRank: number | null;
}
export class RankingUseCase {
constructor(
_standingRepository: StandingRepository,
_driverRepository: DriverRepository,
private readonly _logger: Logger,
) {}
async getAllDriverRankings(): Promise<DriverRanking[]> {
this._logger.debug('Getting all driver rankings');
return [];
}
}