namespace QMSDAL.DTO
{
// ── MCHECKLISTAPPLICABILITY — scope + frequency rule ─────────────────────
public class ChecklistApplicabilityDTO
{
public int ChecklistApplicabilityId { get; set; }
public int ChecklistId { get; set; }
public string? ChecklistName { get; set; }
/// 1=Global, 2=Process, 3=Item, 4=SKU, 5=Workcenter, 6=BizProcessStage (see ChecklistEngineQB's own resolution comment -- the real engine semantics, not the DDL's original comment)
public int ScopeType { get; set; }
public int ProcessId { get; set; } = -1;
public string? ProcessName { get; set; }
public int ItemId { get; set; } = -1;
public string? ItemName { get; set; }
public int SkuId { get; set; } = -1;
public int IndentId { get; set; } = -1;
public int IndentDetailId { get; set; } = -1;
public int WorkcenterId { get; set; } = -1;
public string? WorkcenterName { get; set; }
/// Phase 9b -- BizProcess module stage this checklist audits (ScopeType=6). -1 = not scoped this way.
public int BizProcessStageId { get; set; } = -1;
/// 1=EveryLot, 2=FirstLotOnly, 3=EveryNLots, 4=RandomPct, 5=AllPieces
public int FrequencyType { get; set; }
public decimal FrequencyValue { get; set; } = 1;
public DateOnly? EffectiveFrom { get; set; }
public DateOnly? EffectiveTo { get; set; }
public int Priority { get; set; }
public int Version { get; set; } = 1;
public int TenantId { get; set; }
// Audit
public int CreatedById { get; set; }
public DateOnly CreatedOn { get; set; }
public int ModifiedById { get; set; }
public DateOnly ModifiedOn { get; set; }
}
}