Files
step3/api/QuestionsApi/Models/Question.cs
T

43 lines
1.4 KiB
C#

using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace QuestionsApi.Models;
public class Question
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string? Id { get; set; }
public string ExternalId { get; set; } = "";
public string Stem { get; set; } = "";
public string LeadIn { get; set; } = "";
public List<QuestionChoice> Choices { get; set; } = [];
public string CorrectChoiceId { get; set; } = "";
public string Explanation { get; set; } = "";
public Dictionary<string, string> ChoiceExplanations { get; set; } = [];
public string Discipline { get; set; } = "";
public string System { get; set; } = "";
public int Difficulty { get; set; } = 1;
public List<QuestionLab> Labs { get; set; } = [];
public List<string> Media { get; set; } = [];
public List<string> Tags { get; set; } = [];
public bool IsPublished { get; set; } = true;
public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;
public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow;
}
public class QuestionChoice
{
public string Id { get; set; } = "";
public string Text { get; set; } = "";
}
public class QuestionLab
{
public string Name { get; set; } = "";
public string Value { get; set; } = "";
public string Unit { get; set; } = "";
public string Reference { get; set; } = "";
}