update-game.dto.ts 451 B

12345678910111213141516171819202122
  1. import { IsArray, IsOptional, IsString } from 'class-validator'
  2. import { Charactor } from '../entities/charactors.entity'
  3. import { Type } from 'class-transformer'
  4. export class UpdateGameDto {
  5. @IsString()
  6. @IsOptional()
  7. name?: string
  8. @IsString()
  9. @IsOptional()
  10. roomId?: string
  11. @IsString()
  12. @IsOptional()
  13. background?: string
  14. @IsArray()
  15. @Type(() => Charactor)
  16. @IsOptional()
  17. charactors?: Charactor[]
  18. }