services refactor

This commit is contained in:
2025-12-17 22:17:02 +01:00
parent 26f7a2b6aa
commit 055a7f67b5
93 changed files with 7434 additions and 659 deletions

View File

@@ -1,25 +1,17 @@
import type {
IRaceWithSOFPresenter,
RaceWithSOFResultDTO,
RaceWithSOFViewModel,
} from '@core/racing/application/presenters/IRaceWithSOFPresenter';
import type { RaceWithSOFDto } from '../dtos/RaceWithSOFDto';
export class RaceWithSOFPresenter implements IRaceWithSOFPresenter {
present(dto: RaceWithSOFResultDTO): RaceWithSOFViewModel {
export interface RaceWithSOFViewModel {
id: string;
track: string;
strengthOfField: number | null;
}
export class RaceWithSOFPresenter {
present(dto: RaceWithSOFDto): RaceWithSOFViewModel {
return {
id: dto.raceId,
leagueId: dto.leagueId,
scheduledAt: dto.scheduledAt.toISOString(),
id: dto.id,
track: dto.track,
trackId: dto.trackId,
car: dto.car,
carId: dto.carId,
sessionType: dto.sessionType,
status: dto.status,
strengthOfField: dto.strengthOfField,
registeredCount: dto.registeredCount,
maxParticipants: dto.maxParticipants,
participantCount: dto.participantCount,
};
}
}