Files
front/dto/playerresponse.dto.ts
T
2024-12-29 12:24:32 +01:00

17 lines
360 B
TypeScript

import { Expose, Type } from 'class-transformer';
import { UserResponseDTO } from './userresponse.dto';
export class PlayerResponseDTO {
constructor(partial: Partial<PlayerResponseDTO>) {
Object.assign(this, partial);
this.user = partial.user;
}
@Type(() => UserResponseDTO)
@Expose()
user: UserResponseDTO;
@Expose()
score: number;
}