Files
gridpilot.gg/apps/website/lib/presenters/RaceWithSOFPresenter.ts
2025-12-17 19:25:10 +01:00

25 lines
749 B
TypeScript

import type {
IRaceWithSOFPresenter,
RaceWithSOFResultDTO,
RaceWithSOFViewModel,
} from '@core/racing/application/presenters/IRaceWithSOFPresenter';
export class RaceWithSOFPresenter implements IRaceWithSOFPresenter {
present(dto: RaceWithSOFResultDTO): RaceWithSOFViewModel {
return {
id: dto.raceId,
leagueId: dto.leagueId,
scheduledAt: dto.scheduledAt.toISOString(),
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,
};
}
}