namespace QMSDAL.DTO { // ───────────────────────────────────────────────────────────────────────── // Insert DTO for TRESERVATION rows created during Matrix save and during // Set & Serial generation's RM reservation. Property set matches the live // TRESERVATION schema exactly (verified on 217.216.78.142/VFGPLTEST) — that // table has no RESERVATIONMODE/RESERVATIONSTATUS/RESERVATIONSOURCE/ // ASSIGNMENTLEVEL/ISSUEDQUANTITY columns, so those are not modeled here. // ───────────────────────────────────────────────────────────────────────── public class ReservationInsertDTO { public int TenantId { get; set; } public int OuId { get; set; } public int? PeriodId { get; set; } // Document reference public string? ReservationNumber { get; set; } public DateTime? ReservationDate { get; set; } // Old-schema back-reference columns public string? ReferenceNumber { get; set; } public DateTime? ReferenceDate { get; set; } // FOR side — demand public int? ForObjectHeaderTypeId { get; set; } public int? ForObjectHeaderId { get; set; } public int? ForObjectTypeId { get; set; } public int? ForObjectId { get; set; } public int? ForAllotedAllocationId { get; set; } // FK → TPENDINGALLOCATION; null for matrix reservations public int? ForBizTransactionTypeId { get; set; } public int? ForSlNo { get; set; } public DateTime? ForDate { get; set; } // Item public int ItemId { get; set; } public int? SkuId { get; set; } public int? LotId { get; set; } // Old-schema: reserved-from type (0 = from free stock) public byte ReservedFromType { get; set; } = 0; // Quantities — old schema public decimal ReservedQuantity { get; set; } public decimal UsedQuantity { get; set; } = 0; public decimal BalanceQuantity { get; set; } // = ReservedQuantity on creation // Audit public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } } }