You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
509 B

import { Type } from 'class-transformer'
import {
ArrayMaxSize,
IsArray,
IsDefined,
IsObject,
ValidateNested
} from 'class-validator'
import { PointDtoValidated } from './PointDtoValidated'
import { RectDtoValidated } from './RectDtoValidated'
export class MapDtoValidated {
@IsObject()
@IsDefined()
@Type(() => PointDtoValidated)
size!: PointDtoValidated
@IsArray()
@ArrayMaxSize(5)
@ValidateNested({ each: true })
@Type(() => RectDtoValidated)
walls!: RectDtoValidated[]
}