This commit is contained in:
2025-12-21 19:53:22 +01:00
parent f2d8a23583
commit 3c64f328e2
105 changed files with 3191 additions and 1706 deletions

View File

@@ -2,19 +2,15 @@ import type { Driver } from '@core/racing/domain/entities/Driver';
import type { GetDriverOutputDTO } from '../dtos/GetDriverOutputDTO';
export class DriverPresenter {
private result: GetDriverOutputDTO | null = null;
reset(): void {
this.result = null;
}
private responseModel: GetDriverOutputDTO | null = null;
present(driver: Driver | null): void {
if (!driver) {
this.result = null;
this.responseModel = null;
return;
}
this.result = {
this.responseModel = {
id: driver.id,
iracingId: driver.iracingId.toString(),
name: driver.name.toString(),
@@ -24,7 +20,7 @@ export class DriverPresenter {
};
}
get viewModel(): GetDriverOutputDTO | null {
return this.result;
getResponseModel(): GetDriverOutputDTO | null {
return this.responseModel;
}
}