21 lines
532 B
TypeScript
21 lines
532 B
TypeScript
import type { GetDriverOutputDTO } from '../types/generated/GetDriverOutputDTO';
|
|
|
|
/**
|
|
* View Model for driver summary with rating and rank
|
|
* Transform from DTO to ViewModel with UI fields
|
|
*/
|
|
export class DriverSummaryViewModel {
|
|
driver: GetDriverOutputDTO;
|
|
rating: number | null;
|
|
rank: number | null;
|
|
|
|
constructor(dto: {
|
|
driver: GetDriverOutputDTO;
|
|
rating?: number | null;
|
|
rank?: number | null;
|
|
}) {
|
|
this.driver = dto.driver;
|
|
this.rating = dto.rating ?? null;
|
|
this.rank = dto.rank ?? null;
|
|
}
|
|
} |