using GB5Shared.ListQuery; namespace PIEDAL.DTO.Proposal; // ── TPIELEARNINGPROPOSAL — save / read ──────────────────────────────────────── public class PIELearningProposalDTO { public Guid ProposalId { get; set; } public Guid ProfileId { get; set; } /// Display-only — joined on GET public string? ProfileCode { get; set; } /// /// 1=AddDeviationQuestion 2=UpdateStandardValue 3=RemoveItem /// 4=AddItem 5=UpdateEstimate /// public short ProposalType { get; set; } public string ProposalDescription { get; set; } = string.Empty; /// [{engagementRef, deviationDetail}] — serialized as JSON string public string? EvidenceRefs { get; set; } public decimal? DeviationRate { get; set; } public decimal? AiConfidenceScore { get; set; } /// Proposed change payload — serialized as JSON string public string ProposedContent { get; set; } = "{}"; /// 1=Pending 2=Approved 3=Rejected 4=Deferred public short Status { get; set; } = 1; public int? ReviewedBy { get; set; } public DateTime? ReviewedAt { get; set; } public string? ReviewNotes { get; set; } public DateTime? CreatedAt { get; set; } public int TenantId { get; set; } } // ── Proposal list infrastructure ────────────────────────────────────────────── public sealed class PIEProposalListDTO { public Guid ProposalId { get; set; } public Guid ProfileId { get; set; } public string? ProfileCode { get; set; } public short ProposalType { get; set; } public string ProposalDescription { get; set; } = string.Empty; public short Status { get; set; } public decimal? DeviationRate { get; set; } public decimal? AiConfidenceScore { get; set; } public DateTime? CreatedAt { get; set; } public int TotalCount { get; set; } } public sealed class PIEProposalListCriteria : ICriteria { [CriteriaField("profileid")] public Guid? ProfileId { get; set; } [CriteriaField("status")] public short? Status { get; set; } [CriteriaField("proposaltype")] public short? ProposalType { 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 PIEProposalListQuery(PIEProposalListCriteria Criteria) : IListQuery; // ── ReviewPIEProposal request ───────────────────────────────────────────────── public sealed class PIEReviewProposalDTO { public Guid ProposalId { get; set; } /// 2=Approved 3=Rejected 4=Deferred public short Status { get; set; } public string? ReviewNotes { get; set; } } // ── JSON helper DTOs ────────────────────────────────────────────────────────── public sealed class PIEEvidenceRefDTO { public string EngagementRef { get; set; } = string.Empty; public string? DeviationDetail { get; set; } }