using System;
using System.Collections.Generic;
namespace TMSDAL.DTO.Quiz
{
///
/// DTO for TQUIZATTEMPT — mirrors TASSESSMENTATTEMPT's scoring shape but links directly to
/// EmployeeId (a standalone quiz has no TTRAININGENROLLMENT) and carries CONTEXTENTITYTYPE/
/// CONTEXTENTITYID so an attempt launched from a Show or WI is attributable back to its trigger.
/// ContextEntityType values follow FrameworkDAL.DTO.Taxonomy.TaxonomyEntityTypeConstant's numbering
/// (a documented convention, not a hard FK).
/// DeliveryChannel: 0 InApp, 1 Fls, 2 Manual, 3 Enablement, 4 WorkInstruction, 5 Eip.
///
public class QuizAttemptDTO
{
public int QuizAttemptId { get; set; }
public int QuizId { get; set; }
public int EmployeeId { get; set; }
public int ContextEntityType { get; set; } = -1;
public int ContextEntityId { get; set; } = -1;
public short AttemptNo { get; set; } = 1;
public byte DeliveryChannel { get; set; } = 0;
public DateTime StartedOn { get; set; }
public DateTime? CompletedOn { get; set; }
public int TotalMarks { get; set; }
public decimal MarksObtained { get; set; }
public decimal ScorePct { get; set; }
public byte AttemptIsPassed { get; set; }
public int EvaluatedById { get; set; } = -1;
public string? Remarks { get; set; }
// 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; }
// Populated on demand only (Start/Submit) — not a DB column.
public List? Responses { get; set; }
}
}