diff --git a/src/game/game.dto.ts b/src/game/game.dto.ts index 913b6c0f76637ecc94c82c8853cb5428e411f06d..d41704a06c25c4f309b0efbb63e52eb78e6baf53 100644 --- a/src/game/game.dto.ts +++ b/src/game/game.dto.ts @@ -9,6 +9,8 @@ import { Max, ValidateNested, Allow, + IsUUID, + IsIn, } from 'class-validator'; import { ObjectivePointEntity } from './game.entity'; @@ -68,6 +70,13 @@ export class newGameDTO { enddate: string; } +export class GameStateDTO { + @IsUUID('4') + id: string; + @IsIn(['CREATED', 'STARTED', 'PAUSED', 'ENDED']) + state: string; +} + export class FlagboxDTO { @IsString() @IsNotEmpty()