Embed question verification references

This commit is contained in:
hz
2026-07-13 22:29:20 -05:00
parent 0fe47de423
commit 292f8ff9b4
10 changed files with 203 additions and 4 deletions
@@ -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; } = [];
}
+11
View File
@@ -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;
}
+3 -1
View File
@@ -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
};
}