From 28340f5897501bc4a3157f270c31a5edcd682d8f Mon Sep 17 00:00:00 2001
From: Lorenz Detterbeck <lorenz.detterbeck@gmail.com>
Date: Tue, 6 Mar 2018 14:58:17 +0100
Subject: [PATCH] Add data model for content

---
 src/app/answerOption.ts  |  4 ++++
 src/app/choiceContent.ts |  7 +++++++
 src/app/choiseAnswer.ts  |  7 +++++++
 src/app/content.ts       |  1 -
 src/app/textAnswer.ts    | 10 ++++++++++
 5 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 src/app/answerOption.ts
 create mode 100644 src/app/choiceContent.ts
 create mode 100644 src/app/choiseAnswer.ts
 create mode 100644 src/app/textAnswer.ts

diff --git a/src/app/answerOption.ts b/src/app/answerOption.ts
new file mode 100644
index 000000000..ce6c6e0ab
--- /dev/null
+++ b/src/app/answerOption.ts
@@ -0,0 +1,4 @@
+export class AnswerOption {
+  label: string;
+  points: string;
+}
diff --git a/src/app/choiceContent.ts b/src/app/choiceContent.ts
new file mode 100644
index 000000000..aa29c7f7a
--- /dev/null
+++ b/src/app/choiceContent.ts
@@ -0,0 +1,7 @@
+import { AnswerOption } from './answerOption';
+
+export class ChoiceContent {
+  options: AnswerOption[];
+  correctOtionIndexes: number[];
+  multiple: boolean;
+}
diff --git a/src/app/choiseAnswer.ts b/src/app/choiseAnswer.ts
new file mode 100644
index 000000000..7ca2c7228
--- /dev/null
+++ b/src/app/choiseAnswer.ts
@@ -0,0 +1,7 @@
+export class ChoiceAnswer {
+  id: string;
+  revision: string;
+  contentId: string;
+  round: number;
+  selectedChoiceIndexes: number[];
+}
diff --git a/src/app/content.ts b/src/app/content.ts
index 063558aa4..efaeddd83 100644
--- a/src/app/content.ts
+++ b/src/app/content.ts
@@ -6,7 +6,6 @@ enum Format {
     TEXT,
     GRID
   }
-  
 export class Content {
     id: string;
     revision: string;
diff --git a/src/app/textAnswer.ts b/src/app/textAnswer.ts
new file mode 100644
index 000000000..a4232a41a
--- /dev/null
+++ b/src/app/textAnswer.ts
@@ -0,0 +1,10 @@
+export class TextAnswer {
+  id: string;
+  revision: string;
+  contendId: string;
+  round: number;
+  subject: string;
+  body: string;
+  read: string;
+  creationTimestamp: Date;
+}
-- 
GitLab