18 lines
416 B
TypeScript
18 lines
416 B
TypeScript
import type { DriverDto } from '../dtos';
|
|
import type { DriverViewModel } from '../view-models/DriverViewModel';
|
|
|
|
/**
|
|
* Driver Presenter
|
|
* Transforms DriverDto to DriverViewModel
|
|
*/
|
|
export class DriverPresenter {
|
|
present(dto: DriverDto): DriverViewModel {
|
|
return {
|
|
id: dto.id,
|
|
name: dto.name,
|
|
avatarUrl: dto.avatarUrl,
|
|
iracingId: dto.iracingId,
|
|
rating: dto.rating,
|
|
};
|
|
}
|
|
} |