website refactor

This commit is contained in:
2026-01-16 23:44:37 +01:00
parent b22c705674
commit b8a9528ef3
5 changed files with 43 additions and 14 deletions

View File

@@ -5,6 +5,10 @@
* This is an application layer concern that orchestrates domain data.
*/
import type { ResultRepository } from '../../domain/repositories/ResultRepository';
import type { StandingRepository } from '../../domain/repositories/StandingRepository';
import type { Logger } from '@core/shared/domain/Logger';
export interface DriverStats {
rating: number;
safetyRating: number;
@@ -21,6 +25,15 @@ export interface DriverStats {
overallRank: number | null;
}
export interface DriverStatsUseCase {
getDriverStats(driverId: string): Promise<DriverStats | null>;
export class DriverStatsUseCase {
constructor(
_resultRepository: ResultRepository,
_standingRepository: StandingRepository,
private readonly _logger: Logger,
) {}
async getDriverStats(driverId: string): Promise<DriverStats | null> {
this._logger.debug(`Getting stats for driver ${driverId}`);
return null;
}
}

View File

@@ -5,6 +5,10 @@
* 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;
@@ -13,6 +17,15 @@ export interface DriverRanking {
overallRank: number | null;
}
export interface RankingUseCase {
getAllDriverRankings(): Promise<DriverRanking[]>;
export class RankingUseCase {
constructor(
_standingRepository: StandingRepository,
_driverRepository: DriverRepository,
private readonly _logger: Logger,
) {}
async getAllDriverRankings(): Promise<DriverRanking[]> {
this._logger.debug('Getting all driver rankings');
return [];
}
}