namespace TMSDAL.DTO.Assessment { public class SessionAssessmentDTO { public int AssessmentId { get; set; } public int ProgrammeId { get; set; } public string? ProgrammeCode { get; set; } public string? ProgrammeTitle { get; set; } public int ProgrammeSessionId { get; set; } public string? SessionCode { get; set; } public string? SessionTitle { get; set; } public int SessionTopicId { get; set; } public string? TopicCode { get; set; } public string? TopicTitle { get; set; } public string AssessmentTitle { get; set; } = string.Empty; public byte AssessmentType { get; set; } public byte AssessmentMode { get; set; } // 0 = Simple, 1 = Structured public byte IsPreAssessment { get; set; } public byte IsPostAssessment { get; set; } public short PassThresholdPct { get; set; } public short MaxAttempts { get; set; } public int DurationMins { get; set; } public int TotalMarks { get; set; } public byte IsLmsDelivered { get; set; } public int LmsAssessmentId { get; set; } public byte RandomiseQuestions { get; set; } public byte ShowAnswersOnComplete { get; set; } public byte IsActive { get; set; } public int TenantId { get; set; } // Optional standard fields (for GET/update scenarios) public short Version { get; set; } public byte Status { get; set; } public short SortOrder { get; set; } public byte SourceType { get; set; } // MODE BASED public List? Questions { get; set; } // Simple public AssessmentPaperDTO? Paper { get; set; } // Structured public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } } public class AssessmentQuestionDTO { public int AssessmentQuestionId { get; set; } public int AssessmentId { get; set; } public short SlNo { get; set; } public string QuestionText { get; set; } = string.Empty; public byte QuestionType { get; set; } public string? OptionsJson { get; set; } // ✅ Correct as per DB public string CorrectAnswer { get; set; } = string.Empty; public short Marks { get; set; } public string? Explanation { get; set; } public byte RequiresManualEvaluation { get; set; } public int TenantId { get; set; } } public class AssessmentPaperDTO { public int AssessmentPaperId { get; set; } public int AssessmentId { get; set; } public string PaperTitle { get; set; } = string.Empty; public byte SelectionMode { get; set; } // 0 Fixed, 1 Random, 2 Weighted public int TotalQuestions { get; set; } public int DurationMins { get; set; } public byte RandomiseOrder { get; set; } public byte ShowOneAtTime { get; set; } public byte AllowReview { get; set; } public byte IsLmsDelivered { get; set; } public int LmsAssessmentId { get; set; } public List? Sections { get; set; } } public class PaperSectionDTO { // ===================================================== // PRIMARY KEY // ===================================================== public int PaperSectionId { get; set; } // ===================================================== // PARENT FK // ===================================================== public int AssessmentPaperId { get; set; } /// /// Joined from MASSESSMENTPAPER — display reference for FK /// public string? PaperTitle { get; set; } // ===================================================== // SEQUENCE // ===================================================== public short SlNo { get; set; } = 1; // ===================================================== // BUSINESS COLUMNS // ===================================================== public string SectionTitle { get; set; } = string.Empty; public short QuestionCount { get; set; } = 5; /// /// -1 = Any, 0 = MCQ, 1 = TrueFalse, 2 = ShortAnswer, /// 3 = Essay, 4 = Matching, 5 = FillInTheBlank /// public short QuestionTypeFilter { get; set; } = -1; /// /// -1 = Any, 0 = Easy, 1 = Medium, 2 = Hard /// public short DifficultyFilter { get; set; } = -1; public string? IndustryTagFilter { get; set; } /// /// JSON array of SkillIds e.g. [1, 2, 3] /// public string? SkillTagFilter { get; set; } /// /// JSON array of topic tags e.g. ["Safety", "Compliance"] /// public string? TopicTagFilter { get; set; } /// /// Taxonomy bridge (Quiz roadmap Phase 0, sub-phase 3). -1 = Any. Dual-read alongside /// TopicTagFilter — see QuestionBankQB.GET_QUESTIONS_FOR_SECTION. /// public int CourseIdFilter { get; set; } = -1; public int SubjectIdFilter { get; set; } = -1; public int TopicIdFilter { get; set; } = -1; public short MarksPerQuestion { get; set; } = 1; // ===================================================== // CHILD COLLECTION — populated on demand only // ===================================================== public List? Questions { get; set; } } public class QuestionBankItemDTO { public int QuestionBankId { get; set; } public string QuestionTitle { get; set; } = string.Empty; public string QuestionText { get; set; } = string.Empty; /// /// 0 = MCQ, 1 = TrueFalse, 2 = ShortAnswer, /// 3 = Essay, 4 = Matching, 5 = FillInTheBlank /// public byte QuestionType { get; set; } /// /// JSON array of answer options /// public string? OptionsJson { get; set; } public string CorrectAnswer { get; set; } = string.Empty; public short Marks { get; set; } /// /// 0 = Easy, 1 = Medium, 2 = Hard /// public byte Difficulty { get; set; } public string? IndustryTag { get; set; } public string? SkillTags { get; set; } // JSON array of SkillIds public string? TopicTags { get; set; } // JSON array of topic tags public string? ExplanationText { get; set; } /// Taxonomy bridge (Quiz roadmap Phase 0, sub-phase 3). -1 = unassigned. public int TopicId { get; set; } = -1; public byte IsActive { get; set; } public int TenantId { get; set; } } }