added repository interfaces for all models

added Completion model
This commit is contained in:
Вячеслав 2025-03-14 22:20:08 +05:00
parent 468ddba909
commit 18840fc224
9 changed files with 51 additions and 6 deletions

View file

@ -2,11 +2,10 @@ namespace SurveyLib.Core.Models;
public class Answer
{
public int TryId { get; set; }
public int SurveyId { get; set; }
public int CompletionId { get; set; }
public int QuestionId { get; set; }
public string AnswerText { get; set; }
public Survey Survey { get; set; }
public Completion Completion { get; set; }
public QuestionBase Question { get; set; }
}

View file

@ -0,0 +1,10 @@
namespace SurveyLib.Core.Models;
public class Completion
{
public int Id { get; set; }
public int SurveyId { get; set; }
public DateTime FinishedAt { get; set; }
public Survey Survey { get; set; }
}

View file

@ -2,7 +2,7 @@ namespace SurveyLib.Core.Models;
public class QuestionBase
{
public int Id { get; set; } // TODO: А ведь их наверное много будет, вдруг int однажды не хватит...
public int Id { get; set; }
public int SurveyId { get; set; }
public string Title { get; set; }

View file

@ -7,5 +7,5 @@ public class Survey
public string Description { get; set; }
public ICollection<QuestionBase> Questions { get; set; }
public ICollection<Answer> Answers { get; set; }
public ICollection<Completion> Completions { get; set; }
}