using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TMSDAL.DTO.QuestionBank
{
///
/// DTO for MQUESTIONBANK table.
/// Shared (TENANTID=-1) and client-specific question pool for structured assessments.
///
/// QUESTIONTYPE : 0 MCQ | 1 TrueFalse | 2 ShortAnswer | 3 MultiSelect | 4 Matching | 5 Ordering
/// QBANKDIFFICULTY: 0 Easy | 1 Medium | 2 Hard
/// ISSHARED : 0 Client-specific | 1 Shared global (TENANTID=-1)
/// ISACTIVE : 0 No | 1 Yes
/// STATUS : 0-5
/// SOURCETYPE : 1-5
///
public class QuestionBankDTO
{
// =====================================================
// PRIMARY KEY
// =====================================================
public int QuestionBankId { get; set; }
// =====================================================
// BUSINESS COLUMNS
// =====================================================
///
/// 0 = Client-specific, 1 = Shared global (TenantId = -1)
///
public byte IsShared { get; set; } = 0;
public string QuestionTitle { get; set; } = string.Empty;
public string QuestionText { get; set; } = string.Empty;
///
/// 0 = MCQ, 1 = TrueFalse, 2 = ShortAnswer,
/// 3 = MultiSelect, 4 = Matching, 5 = Ordering
///
public byte QuestionType { get; set; } = 0;
///
/// JSON array of answer options
///
public string? OptionsJson { get; set; }
public string CorrectAnswer { get; set; } = string.Empty;
public short Marks { get; set; } = 1;
///
/// 0 = Easy, 1 = Medium, 2 = Hard
///
public byte QBankDifficulty { get; set; } = 1;
public string? IndustryTag { get; set; }
public string? SkillTags { get; set; } // JSON array of SkillIds
public string? TopicTags { get; set; } // JSON array of keyword strings
public string? ExplanationText { get; set; }
///
/// Taxonomy bridge (Quiz roadmap Phase 0, sub-phase 1+3). -1 = unassigned.
/// Dual-read alongside TopicTags during the transition — see QuestionBankQB's
/// GET_SELECTLIST_QUESTIONBANK/GET_QUESTIONS_FOR_SECTION OR-filter.
/// FK targets: FrameworkDAL.DTO.Taxonomy.{Course,Subject,Topic}DTO (GB5Framework module).
///
public int CourseId { get; set; } = -1;
public int SubjectId { get; set; } = -1;
public int TopicId { get; set; } = -1;
public int UsageCount { get; set; } = 0;
///
/// 0 = No, 1 = Yes
///
public byte IsActive { get; set; } = 1;
// =====================================================
// STANDARD FIELDS
// =====================================================
public short Version { get; set; }
public byte Status { get; set; }
public short SortOrder { get; set; }
public byte SourceType { get; set; }
public int TenantId { get; set; }
public int CreatedById { get; set; }
public DateTime CreatedOn { get; set; }
public int ModifiedById { get; set; }
public DateTime ModifiedOn { get; set; }
}
}