25 lines
749 B
TypeScript
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,
|
|
};
|
|
}
|
|
} |