From e3d548d01b6c835bd49f818a718173fe4451665d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de>
Date: Mon, 19 Aug 2019 18:38:34 +0200
Subject: [PATCH] Adjust comment model

---
 src/app/models/comment.ts            | 6 ++++--
 src/app/models/correct-wrong.enum.ts | 5 +++++
 2 files changed, 9 insertions(+), 2 deletions(-)
 create mode 100644 src/app/models/correct-wrong.enum.ts

diff --git a/src/app/models/comment.ts b/src/app/models/comment.ts
index b8d4dbf21..51308497b 100644
--- a/src/app/models/comment.ts
+++ b/src/app/models/comment.ts
@@ -1,3 +1,5 @@
+import { CorrectWrong } from './correct-wrong.enum';
+
 export class Comment {
   id: string;
   roomId: string;
@@ -5,7 +7,7 @@ export class Comment {
   revision: string;
   body: string;
   read: boolean;
-  correct: boolean;
+  correct: CorrectWrong;
   favorite: boolean;
   timestamp: Date;
   score: number;
@@ -17,7 +19,7 @@ export class Comment {
               userId: string = '',
               body: string = '',
               read: boolean = false,
-              correct: boolean = false,
+              correct: CorrectWrong = CorrectWrong.NULL,
               favorite: boolean = false,
               creationTimestamp: Date = null,
               score: number = 0,
diff --git a/src/app/models/correct-wrong.enum.ts b/src/app/models/correct-wrong.enum.ts
new file mode 100644
index 000000000..6448e3799
--- /dev/null
+++ b/src/app/models/correct-wrong.enum.ts
@@ -0,0 +1,5 @@
+export enum CorrectWrong {
+  NULL,
+  CORRECT,
+  WRONG
+}
-- 
GitLab