namespace QMSDAL.DTO { // ── Lightweight insert DTO for TLOT rows created during matrix activation ─ // Used only with BulkInsertAsync during ActivateMatrix. public class TlotInsertDTO { public int LotId { get; set; } public string LotNumber { get; set; } = string.Empty; public int ItemId { get; set; } public int SkuId { get; set; } = -1; public int LotTypeId { get; set; } public int ProcessId { get; set; } public DateTime LotDate { get; set; } public DateTime LotExpiryDate { get; set; } // ← ADD public byte Status { get; set; } = 1; public short Version { get; set; } = 0; // ← ADD public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } public int AllocationId { get; set; } public int TenantId { get; set; } // keep for BLL use, not inserted } // ── Insert DTO for TLOTDETAIL rows created during matrix activation ──────── // One row per TLOT row — registers the lot as available stock (GOODQUANTITY > 0) // so that GET_AVAILABLE_BATCHES stock-balance query sees it correctly. public class TlotDetailInsertDTO { public int LotDetailId { get; set; } public int BizTransactionTypeId { get; set; } // -1499999569 (LTPRD) public int ObjectHeaderTypeId { get; set; } // -1499999999 (TMATRIX) public int ObjectHeaderId { get; set; } // MatrixId public int ObjectTypeId { get; set; } // -1499999993 (TMATRIXOUTPUT) public int ObjectId { get; set; } // MatrixOutputId public short SlNo { get; set; } // 1 public int LotId { get; set; } // FK → TLOT.LOTID public decimal Quantity { get; set; } // 1 public decimal GoodQuantity { get; set; } // 1 (stock IN) public decimal RejectedQuantity { get; set; } // 0 public decimal ReworkQuantity { get; set; } // 0 public decimal OtherQuantity { get; set; } // 0 public int PackId { get; set; } // -1 public decimal PackQuantity { get; set; } // 0 public int OuId { get; set; } // login.WorkOUId public int StoreId { get; set; } // from matrix/login public string StockLedgerNumber { get; set; } = string.Empty; // MatrixCode public DateTime StockLedgerDate { get; set; } // now public string ReferenceNumber { get; set; } = string.Empty; // SoNumber public DateTime ReferenceDate { get; set; } // now public byte LocationType { get; set; } // 0 public int PartyBranchId { get; set; } // -1 public byte StockPostType { get; set; } // 0 public byte MaterialOwnershipType { get; set; } // 0 public int UsedInLotId { get; set; } // -1 public int ReasonId { get; set; } // -1 public decimal MarkedGoodQuantity { get; set; } // 0 public decimal PlannedQuantity { get; set; } // 1 public int BinId { get; set; } // -1 public decimal ItemPostedCost { get; set; } // 0 public decimal D1 { get; set; } // 0 public decimal D2 { get; set; } // 0 public decimal D3 { get; set; } // 0 public decimal D4 { get; set; } // 0 public decimal D5 { get; set; } // 0 public int AllocationId { get; set; } // matrix.AllocationId } }