using GB5Shared.ListQuery; namespace IDMSDAL.DTOs; // ── sign_off_register — detail / insert ────────────────────────────────────── // L table — INSERT-only. No update or delete operations exist. // PK is IDENTITY — initialized to 0 in DTO; set by DB on insert. public class SignOffDTO { public int SignOffId { get; set; } // 0 until inserted public int EngagementId { get; set; } public int TenantId { get; set; } public string DomainCode { get; set; } = string.Empty; public string SignOffType { get; set; } = string.Empty; public string SignOffName { get; set; } = string.Empty; public string SignedItems { get; set; } = "[]"; // JSON array of int item IDs public string SignedByName { get; set; } = string.Empty; public int SignedById { get; set; } public string? SignedByClient { get; set; } public DateTime? ClientSignedOn { get; set; } public DateTime? SignedOn { get; set; } public int DeliveryManagerId { get; set; } // -1 if none public string? IpAddress { get; set; } public string? DeviceFingerprint { get; set; } public string ContentHash { get; set; } = string.Empty; // SHA-256 hex public string ContentSnapshot { get; set; } = "{}"; // JSON snapshot public bool IsDigitalSignature { get; set; } public string? DeliveryMode { get; set; } public string? DocumentUrl { get; set; } // L table audit fields — CreatedById/CreatedOn only (no Modified fields) public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } } // ── sign-off list ───────────────────────────────────────────────────────────── public sealed class SignOffListDTO { public int SignOffId { get; set; } public string DomainCode { get; set; } = string.Empty; public string SignOffType { get; set; } = string.Empty; public string SignOffName { get; set; } = string.Empty; public string SignedByName { get; set; } = string.Empty; public string? SignedByClient { get; set; } public DateTime? SignedOn { get; set; } public bool IsDigitalSignature { get; set; } public int TotalCount { get; set; } } public sealed class SignOffListCriteria : ICriteria { [CriteriaField("engagementid")] public int? EngagementId { get; set; } [CriteriaField("domaincode")] public string? DomainCode { get; set; } [CriteriaField("searchtext")] public string? SearchText { get; set; } [CriteriaField("ouid")] public int? OUId { get; set; } [CriteriaField("sortby")] public string? SortBy { get; set; } [CriteriaField("sortdesc")] public bool SortDesc { get; set; } [CriteriaField("pagesize")] public int PageSize { get; set; } = 50; [CriteriaField("pageoffset")] public int PageOffset { get; set; } = 0; } public sealed record SignOffListQuery(SignOffListCriteria Criteria) : IListQuery;