-
Notifications
You must be signed in to change notification settings - Fork 2
new entities #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
new entities #4
Changes from 1 commit
4918eaf
568684a
ad7ff92
1dd83da
550327e
9320d7e
0db318a
6e52b86
c1eaa62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup /> | ||
| </Project> | ||
| 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; } | ||
| } | ||
| } |
| 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; } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. это для открытого вопроса, а для вопроса с выбором вариантов не будем ссылку на выбранный ответ делать? |
||
|
|
||
| public virtual bool IsRight { get; set; } | ||
|
|
||
| public virtual TestQuestion Question { get; set; } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text; | ||
|
|
||
| namespace GraphLabs.Backend.Domain | ||
| { | ||
| public class TestQuestion | ||
| { | ||
| public virtual long Id { get; set; } | ||
|
|
||
| public virtual string Description { get; set; } | ||
|
|
||
| public enum Difficulty : int { Three, Four, Five } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Для перечислений (вообще всех) нужно воспользоваться старым дедовским синтаксисом. Объявляем сначала в отдельном файле новый энам , а потом где нужно его используем (public Mark Difficulty) Это облегчит дальнейшее переиспользование этого типа и избавит от ошибок (например, на этой строке забыли цифровые значения присвоить) |
||
|
|
||
| public virtual int MaxScore { get; set; } | ||
|
|
||
| public virtual string ImageURL { get; set; } | ||
|
|
||
| public virtual TestResult TestResult { get; set; } | ||
|
|
||
| public virtual Subject Subject { get; set; } | ||
|
|
||
| public virtual ICollection<TestAnswer> Answers { get; set; } | ||
| } | ||
| } | ||
| 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 Mark { get; set; } | ||
|
|
||
| public enum MarkEU : int { F, E, D, C, B, A } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. тоже отдельный enum завести MarkEu |
||
|
|
||
| public enum MarkRU : int { Two = 2, Three = 3, Four = 4, Five = 5 } | ||
|
|
||
| public virtual Student Student { get; set; } | ||
|
|
||
| public virtual ICollection<TestQuestion> Questions { get; set; } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Вопрос. А всё-таки TestResult это ответ на один вопрос или на все вопросы? |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,5 +16,7 @@ public abstract class User | |
| public virtual byte[] PasswordHash { get; set; } | ||
|
|
||
| public virtual byte[] PasswordSalt { get; set; } | ||
|
|
||
| public virtual string Token { get; set; } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. А вот это что такое и для чего? |
||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можешь этот файл в гитигнор отправить?