"readme.md" did not exist on "00ecf4685e119e2cde037f489f40129c47c8c982"
Newer
Older
import { GameEntity, ObjectivePointEntity } from './game.entity';
import { CenterJSON, RoleValidation } from '../shared/custom-validation';
export class GameDTO {
@IsString()
@IsNotEmpty()
name: string;
@IsNotEmpty()
@Length(1, 255)
desc: string;
@IsDateString()
@IsNotEmpty()
startdate: string;
@IsDateString()
@IsNotEmpty()
enddate: string;
export class newGameDTO {
@IsString()
@IsNotEmpty()
@Length(3, 30)
name: string;
@IsString()
@IsNotEmpty()
@Length(1, 255)
desc: string;
@IsNotEmpty()
center: JSON;
@IsDateString()
@IsNotEmpty()
startdate: string;
@IsDateString()
@IsNotEmpty()
enddate: string;
}
export class FactionDTO {
@IsString()
@IsNotEmpty()
@Length(2, 15)
export class FlagboxDTO {
@IsString()
@IsNotEmpty()
@Length(7)
objectivePointDescription: string;
@IsNumber()
objectivePointMultiplier: number;
}
export class FlagboxEventDTO {
@IsString()
@IsNotEmpty()
@Length(7)
@IsNumber()
@Min(0)
@Max(3)
owner: number; // owner = 0, => first entry in faction db, owner = 1, => second entry etc
@IsNumber()
@Min(0)
@Max(3)
action: number; // 0=no capture ongoing, 1=captured, 2=capture ongoing
@IsNumber()
@Min(0)
@Max(3)
capture: number; // which faction is capturing, same logic as in owner with numbers
oP_HistoryTimestamp?: string;
objective_point?: ObjectivePointEntity;
export class GameGroupDTO {
@IsString()
@Length(3, 31)
name: string;
export class JoinFactionDTO {
@IsUUID('4')
factionId: string;
@Length(3, 31)
factionPassword: string;
@IsUUID('4')
game: GameEntity;
}
export class PromotePlayerDTO {
@IsUUID('4')
player: string;
@Validate(RoleValidation)
role: string;
}