From 7d7e44bf5e351c8f7562b170b2025cecb3ac1a8f Mon Sep 17 00:00:00 2001
From: Ronnie Friman <L4168@student.jamk.fi>
Date: Sat, 6 Jul 2019 16:10:35 +0300
Subject: [PATCH] added notificationDTO

---
 src/notifications/notification.dto.ts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 src/notifications/notification.dto.ts

diff --git a/src/notifications/notification.dto.ts b/src/notifications/notification.dto.ts
new file mode 100644
index 0000000..807af14
--- /dev/null
+++ b/src/notifications/notification.dto.ts
@@ -0,0 +1,12 @@
+import { IsString, Length, IsUUID, IsIn } from 'class-validator';
+
+export class NotificationdDTO {
+  // alert is for serious messages, note is for smaller updates on a situation
+  @IsIn(['alert', 'note'])
+  type: string;
+  @IsString()
+  @Length(0, 63)
+  message: string;
+  @IsUUID('4')
+  game: string;
+}
-- 
GitLab