Embed question verification references
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
namespace QuestionsApi.Models;
|
||||
|
||||
public class BulkQuestionReferencesRequest
|
||||
{
|
||||
public List<QuestionReferencesUpdate> Questions { get; set; } = [];
|
||||
}
|
||||
|
||||
public class QuestionReferencesUpdate
|
||||
{
|
||||
public string ExternalId { get; set; } = "";
|
||||
public List<QuestionReference> References { get; set; } = [];
|
||||
}
|
||||
@@ -25,6 +25,7 @@ public class Question
|
||||
public List<QuestionLab> Labs { get; set; } = [];
|
||||
public List<string> Media { get; set; } = [];
|
||||
public List<string> Tags { get; set; } = [];
|
||||
public List<QuestionReference> References { get; set; } = [];
|
||||
public bool IsPublished { get; set; } = true;
|
||||
public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;
|
||||
public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow;
|
||||
@@ -51,3 +52,13 @@ public class WrongAnswerFollowup
|
||||
public string CorrectChoiceId { get; set; } = "";
|
||||
public string TeachingPoint { get; set; } = "";
|
||||
}
|
||||
|
||||
public class QuestionReference
|
||||
{
|
||||
public string Title { get; set; } = "";
|
||||
public string Publisher { get; set; } = "";
|
||||
public string Url { get; set; } = "";
|
||||
public string Supports { get; set; } = "";
|
||||
public string AccessedOn { get; set; } = "";
|
||||
public string Reviewer { get; set; } = "";
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ public class UpsertQuestionRequest
|
||||
public List<QuestionLab> Labs { get; set; } = [];
|
||||
public List<string> Media { get; set; } = [];
|
||||
public List<string> Tags { get; set; } = [];
|
||||
public List<QuestionReference> References { get; set; } = [];
|
||||
public bool IsPublished { get; set; } = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ public class QuestionResponse
|
||||
public List<QuestionLab> Labs { get; set; } = [];
|
||||
public List<string> Media { get; set; } = [];
|
||||
public List<string> Tags { get; set; } = [];
|
||||
public List<QuestionReference> References { get; set; } = [];
|
||||
|
||||
public static QuestionResponse FromModel(
|
||||
Question question,
|
||||
@@ -56,7 +57,8 @@ public class QuestionResponse
|
||||
QuestionElo = questionElo,
|
||||
Labs = question.Labs,
|
||||
Media = question.Media,
|
||||
Tags = question.Tags
|
||||
Tags = question.Tags,
|
||||
References = question.References
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user