seed data

This commit is contained in:
2025-12-30 00:15:35 +01:00
parent 7a853d4e43
commit ccaa39c39c
22 changed files with 1342 additions and 173 deletions

View File

@@ -1,33 +1,17 @@
import type { IDriverStatsService, DriverStats } from '@core/racing/domain/services/IDriverStatsService';
import type { Logger } from '@core/shared/application';
import { DriverStatsStore } from './DriverStatsStore';
export class InMemoryDriverStatsService implements IDriverStatsService {
private store: DriverStatsStore;
constructor(private readonly logger: Logger) {
this.logger.info('InMemoryDriverStatsService initialized.');
this.store = DriverStatsStore.getInstance();
}
getDriverStats(driverId: string): DriverStats | null {
this.logger.debug(`[InMemoryDriverStatsService] Getting stats for driver: ${driverId}`);
// Mock data for demonstration purposes
if (driverId === 'driver-1') {
return {
rating: 2500,
wins: 10,
podiums: 15,
totalRaces: 50,
overallRank: 1,
};
}
if (driverId === 'driver-2') {
return {
rating: 2400,
wins: 8,
podiums: 12,
totalRaces: 45,
overallRank: 2,
};
}
return null;
return this.store.getDriverStats(driverId);
}
}
}