seed data
This commit is contained in:
@@ -18,4 +18,7 @@ export class DriverDTO {
|
||||
|
||||
@ApiProperty()
|
||||
joinedAt!: string;
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
category?: string;
|
||||
}
|
||||
@@ -13,6 +13,9 @@ export class DriverLeaderboardItemDTO {
|
||||
@ApiProperty()
|
||||
skillLevel!: string; // Assuming skillLevel is a string like 'Rookie', 'Pro', etc.
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
category?: string;
|
||||
|
||||
@ApiProperty()
|
||||
nationality!: string;
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@ export class DriverProfileDriverSummaryDTO {
|
||||
@ApiProperty()
|
||||
joinedAt!: string;
|
||||
|
||||
@ApiProperty({ nullable: true })
|
||||
category!: string | null;
|
||||
|
||||
@ApiProperty({ nullable: true })
|
||||
rating!: number | null;
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@ export class GetDriverOutputDTO {
|
||||
@ApiProperty()
|
||||
joinedAt!: string;
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
category?: string;
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
rating?: number;
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ export class DriverPresenter {
|
||||
country: driver.country.toString(),
|
||||
joinedAt: driver.joinedAt.toDate().toISOString(),
|
||||
...(driver.bio ? { bio: driver.bio.toString() } : {}),
|
||||
...(driver.category ? { category: driver.category } : {}),
|
||||
// Add stats fields
|
||||
...(stats ? {
|
||||
rating: stats.rating,
|
||||
|
||||
@@ -18,6 +18,7 @@ export class DriverProfilePresenter
|
||||
avatarUrl: this.getAvatarUrl(result.driverInfo.driver.id) || '',
|
||||
iracingId: result.driverInfo.driver.iracingId.toString(),
|
||||
joinedAt: result.driverInfo.driver.joinedAt.toDate().toISOString(),
|
||||
category: result.driverInfo.driver.category || null,
|
||||
rating: result.driverInfo.rating,
|
||||
globalRank: result.driverInfo.globalRank,
|
||||
consistency: result.driverInfo.consistency,
|
||||
|
||||
@@ -13,6 +13,7 @@ export class DriversLeaderboardPresenter {
|
||||
name: item.driver.name.toString(),
|
||||
rating: item.rating,
|
||||
skillLevel: item.skillLevel,
|
||||
...(item.driver.category !== undefined ? { category: item.driver.category } : {}),
|
||||
nationality: item.driver.country.toString(),
|
||||
racesCompleted: item.racesCompleted,
|
||||
wins: item.wins,
|
||||
|
||||
Reference in New Issue
Block a user