Erster Entwurf DataModel;
This commit is contained in:
19
MultipleChoiceTrainer/Models/DataModels/Answer.cs
Normal file
19
MultipleChoiceTrainer/Models/DataModels/Answer.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MultipleChoiceTrainer.Models.DataModels
|
||||||
|
{
|
||||||
|
public class Answer
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public DateTime Date { get; set; }
|
||||||
|
|
||||||
|
public Question Question { get; set; }
|
||||||
|
public int QuestionId { get; set; }
|
||||||
|
|
||||||
|
public bool Successfull { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
16
MultipleChoiceTrainer/Models/DataModels/Category.cs
Normal file
16
MultipleChoiceTrainer/Models/DataModels/Category.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MultipleChoiceTrainer.Models.DataModels
|
||||||
|
{
|
||||||
|
public class Category
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
public ICollection<Section> Sections { get; set; } = new HashSet<Section>();
|
||||||
|
}
|
||||||
|
}
|
||||||
17
MultipleChoiceTrainer/Models/DataModels/Choice.cs
Normal file
17
MultipleChoiceTrainer/Models/DataModels/Choice.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MultipleChoiceTrainer.Models.DataModels
|
||||||
|
{
|
||||||
|
public class Choice
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public Question Question { get; set; }
|
||||||
|
public int QuestionId { get; set; }
|
||||||
|
|
||||||
|
public string Text { get; set; }
|
||||||
|
public bool IsTrue { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
20
MultipleChoiceTrainer/Models/DataModels/Question.cs
Normal file
20
MultipleChoiceTrainer/Models/DataModels/Question.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MultipleChoiceTrainer.Models.DataModels
|
||||||
|
{
|
||||||
|
public class Question
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Text { get; set; }
|
||||||
|
|
||||||
|
public Section Section { get; set; }
|
||||||
|
public int SectionId { get; set; }
|
||||||
|
|
||||||
|
public ICollection<Choice> Choices { get; set; } = new HashSet<Choice>();
|
||||||
|
|
||||||
|
public ICollection<Answer> Answers { get; set; } = new HashSet<Answer>();
|
||||||
|
}
|
||||||
|
}
|
||||||
19
MultipleChoiceTrainer/Models/DataModels/Section.cs
Normal file
19
MultipleChoiceTrainer/Models/DataModels/Section.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace MultipleChoiceTrainer.Models.DataModels
|
||||||
|
{
|
||||||
|
public class Section
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
public Category Category { get; set; }
|
||||||
|
public int CategoryId { get; set; }
|
||||||
|
|
||||||
|
public ICollection<Question> Questions { get; set; } = new HashSet<Question>();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user