Newer
Older
export class GameDTO {
@IsString()
@IsNotEmpty()
@IsNotEmpty()
@Length(1, 255)
desc: string;
// doesn't accept with IsJSON, WIP to get validation for map and center
// IsJSON checks with json.parse, expecting string
@IsDateString()
@IsNotEmpty()
startdate: string;
@IsDateString()
@IsNotEmpty()
enddate: string;
// custom validation for array length (arr>min, arr<max)
@IsArray()
@IsNotEmpty()
objectivePoint?: ObjectivePointDTO[];
}
export class FactionDTO {
@IsString()
@IsNotEmpty()
@Length(2, 15)
name: string;
id: string;
game: GameDTO;