Newer
Older
import { ObjectivePointEntity } from './game.entity';
export class GameDTO {
@IsString()
@IsNotEmpty()
name: string;
@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)
}
export class FactionDTO {
@IsString()
@IsNotEmpty()
@Length(2, 15)
factionName: string;
factionPassword: string;
multiplier: number;