From dd64c997c98c33100599f0ecd5195f1c59209e83 Mon Sep 17 00:00:00 2001 From: L4168 <L4168@student.jamk.fi> Date: Thu, 4 Jul 2019 11:01:36 +0300 Subject: [PATCH] added GameStateDTO --- src/game/game.dto.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game/game.dto.ts b/src/game/game.dto.ts index 913b6c0..d41704a 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() -- GitLab