Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/.idea
/.vs
/*.user
/GraphLabs.Backend.Domain/GraphLabs.Backend.Domain.csproj.user

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

надо вместо строк 4 и 5 сделать одну *.user


# Build results
[Dd]ebug/
Expand Down
31 changes: 31 additions & 0 deletions GraphLabs.Backend.Domain/Mark.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GraphLabs.Backend.Domain
{
public enum MarkRU
{
Two = 2,
Three = 3,
Four = 4,
Five = 5
}

public enum MarkEU
{
F = 0,
E = 60,
D = 65,
C = 75,
B = 85,
A = 90
}

public enum Difficulty
{
Three = 3,
Four = 4,
Five = 5
}
}
2 changes: 2 additions & 0 deletions GraphLabs.Backend.Domain/Student.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ public class Student : User
public virtual string Group { get; set; }

public virtual ICollection<TaskVariantLog> Logs { get; set; }

public virtual ICollection<TestResult> TestResults { get; set; }
}
}
19 changes: 19 additions & 0 deletions GraphLabs.Backend.Domain/Subject.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GraphLabs.Backend.Domain
{
public class Subject
{
public virtual long Id { get; set; }

public virtual string Name { get; set; }

public virtual string Description { get; set; }

public virtual ICollection<TaskModule> TaskModules { get; set; }

public virtual ICollection<TestQuestion> TestQuestions { get; set; }
}
}
2 changes: 2 additions & 0 deletions GraphLabs.Backend.Domain/TaskModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class TaskModule
public virtual string Description { get; set; }

public virtual string Version { get; set; }

public virtual Subject Subject { get; set; }

public virtual ICollection<TaskVariant> Variants { get; set; }
}
Expand Down
17 changes: 17 additions & 0 deletions GraphLabs.Backend.Domain/TestAnswer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GraphLabs.Backend.Domain
{
public class TestAnswer
{
public virtual long Id { get; set; }

public virtual string Answer { get; set; }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это для открытого вопроса, а для вопроса с выбором вариантов не будем ссылку на выбранный ответ делать?


public virtual bool IsRight { get; set; }

public virtual TestQuestionVersion TestQuestionVersion { get; set; }
}
}
15 changes: 15 additions & 0 deletions GraphLabs.Backend.Domain/TestQuestion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GraphLabs.Backend.Domain
{
public class TestQuestion
{
public virtual long Id { get; set; }

public virtual Subject Subject { get; set; }

public virtual ICollection<TestQuestionVersion> TestQuestionVersions { get; set; }
}
}
23 changes: 23 additions & 0 deletions GraphLabs.Backend.Domain/TestQuestionVersion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GraphLabs.Backend.Domain
{
public class TestQuestionVersion
{
public virtual long Id { get; set; }

public virtual string PlainText { get; set; }

public virtual Difficulty Difficulty { get; set; }

public virtual int MaxScore { get; set; }

public virtual TestQuestion TestQuestion { get; set; }

public virtual ICollection<TestStudentAnswer> TestStudentAnswers { get; set; }

public virtual ICollection<TestAnswer> TestAnswers { get; set; }
}
}
23 changes: 23 additions & 0 deletions GraphLabs.Backend.Domain/TestResult.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GraphLabs.Backend.Domain
{
public class TestResult
{
public virtual long Id { get; set; }

public virtual DateTime DateTime { get; set; }

public virtual int Score { get; set; }

public virtual MarkEU MarkEU { get; set; }

public virtual MarkRU MarkRU { get; set; }

public virtual Student Student { get; set; }

public virtual ICollection<TestStudentAnswer> TestStudentAnswer { get; set; }
}
}
21 changes: 21 additions & 0 deletions GraphLabs.Backend.Domain/TestStudentAnswer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace GraphLabs.Backend.Domain
{
public class TestStudentAnswer
{
public virtual long Id { get; set; }

public virtual long AnswerId { get; set; }

public virtual string Answer { get; set; }

public virtual bool IsRight { get; set; }

public virtual TestResult TestResult { get; set; }

public virtual TestQuestionVersion TestQuestionVersion { get; set; }
}
}