Skip to content

Comments

new entities#4

Open
ProstoMimoProhodill wants to merge 9 commits intoGraphLabsSuite:masterfrom
ProstoMimoProhodill:testing-system
Open

new entities#4
ProstoMimoProhodill wants to merge 9 commits intoGraphLabsSuite:masterfrom
ProstoMimoProhodill:testing-system

Conversation

@ProstoMimoProhodill
Copy link

No description provided.

@svtz svtz self-requested a review April 12, 2020 12:21
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Member

Choose a reason for hiding this comment

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

можешь этот файл в гитигнор отправить?


public virtual string Description { get; set; }

public enum Difficulty : int { Three, Four, Five }
Copy link
Member

Choose a reason for hiding this comment

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

Для перечислений (вообще всех) нужно воспользоваться старым дедовским синтаксисом. Объявляем сначала в отдельном файле новый энам

public enum Mark 
{
  Two = 2, 
  Three =3, 
  Four =4, 
  Five = 5
}

, а потом где нужно его используем (public Mark Difficulty)

Это облегчит дальнейшее переиспользование этого типа и избавит от ошибок (например, на этой строке забыли цифровые значения присвоить)


public virtual int Mark { get; set; }

public enum MarkEU : int { F, E, D, C, B, A }
Copy link
Member

Choose a reason for hiding this comment

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

тоже отдельный enum завести MarkEu


public virtual Student Student { get; set; }

public virtual ICollection<TestQuestion> Questions { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

Вопрос. А всё-таки TestResult это ответ на один вопрос или на все вопросы?
Потому что на картинке в этом месте вижу несоответствие между направлением связи и проставленными кардинальностями (1 N)


public virtual byte[] PasswordSalt { get; set; }

public virtual string Token { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

А вот это что такое и для чего?

.gitignore Outdated
/.idea
/.vs
/*.user
/GraphLabs.Backend.Domain/GraphLabs.Backend.Domain.csproj.user
Copy link
Member

Choose a reason for hiding this comment

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

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

{
public virtual long Id { get; set; }

public virtual string Answer { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants