namespace QuestionsApi.Models; public class QuestionResponse { public string Id { get; set; } = ""; public string ExternalId { get; set; } = ""; public string Stem { get; set; } = ""; public string LeadIn { get; set; } = ""; public List Choices { get; set; } = []; public string CorrectChoiceId { get; set; } = ""; public string Explanation { get; set; } = ""; public Dictionary ChoiceExplanations { get; set; } = []; public string Discipline { get; set; } = ""; public string System { get; set; } = ""; public int Difficulty { get; set; } public List Labs { get; set; } = []; public List Media { get; set; } = []; public List Tags { get; set; } = []; public static QuestionResponse FromModel(Question question) => new() { Id = question.Id ?? "", ExternalId = question.ExternalId, Stem = question.Stem, LeadIn = question.LeadIn, Choices = question.Choices, CorrectChoiceId = question.CorrectChoiceId, Explanation = question.Explanation, ChoiceExplanations = question.ChoiceExplanations, Discipline = question.Discipline, System = question.System, Difficulty = question.Difficulty, Labs = question.Labs, Media = question.Media, Tags = question.Tags }; }