using MongoDB.Bson; using MongoDB.Bson.Serialization.Attributes; namespace QuestionsApi.Models; public static class QuestionReportCategory { public const string Clarity = "clarity"; public const string MedicalAccuracy = "medical_accuracy"; public const string AnswerExplanation = "answer_explanation"; public const string FormattingMedia = "formatting_media"; public const string TechnicalIssue = "technical_issue"; public const string Other = "other"; public static readonly HashSet All = [ Clarity, MedicalAccuracy, AnswerExplanation, FormattingMedia, TechnicalIssue, Other ]; } public static class QuestionReportStatus { public const string Open = "open"; public const string Resolved = "resolved"; public const string Dismissed = "dismissed"; public static readonly HashSet Terminal = [Resolved, Dismissed]; } public class QuestionReport { [BsonId] [BsonRepresentation(BsonType.ObjectId)] public string? Id { get; set; } public string QuestionExternalId { get; set; } = ""; public string QuestionMongoId { get; set; } = ""; public string UserId { get; set; } = ""; public string Category { get; set; } = ""; public string Details { get; set; } = ""; public string Status { get; set; } = QuestionReportStatus.Open; public QuestionReportSnapshot QuestionSnapshot { get; set; } = new(); public string ReviewedByUserId { get; set; } = ""; public string ReviewerNote { get; set; } = ""; public DateTime? ReviewedUtc { get; set; } public DateTime CreatedUtc { get; set; } = DateTime.UtcNow; public DateTime UpdatedUtc { get; set; } = DateTime.UtcNow; } public class QuestionReportSnapshot { 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 string KeyTakeaway { get; set; } = ""; public string UsmlePearl { get; set; } = ""; public List ReviewFollowups { get; set; } = []; public Dictionary ChoiceExplanations { get; set; } = []; public Dictionary WrongAnswerFollowups { get; set; } = []; public List Labs { get; set; } = []; public List Media { get; set; } = []; } public class CreateQuestionReportRequest { public string QuestionExternalId { get; set; } = ""; public string Category { get; set; } = ""; public string Details { get; set; } = ""; } public class CreateQuestionReportResponse { public string Id { get; set; } = ""; public string QuestionExternalId { get; set; } = ""; public string Category { get; set; } = ""; public string Status { get; set; } = QuestionReportStatus.Open; public DateTime CreatedUtc { get; set; } } public class UpdateQuestionReportStatusRequest { public string Status { get; set; } = ""; public string ReviewerNote { get; set; } = ""; } public class QuestionReportListResponse { public List Items { get; set; } = []; public long Total { get; set; } public int Skip { get; set; } public int Limit { get; set; } }