namespace MMDAL.DTO.ItemReason { public class ItemReasonSaveDTO { public int ItemReasonId { get; set; } public int ObjectHeaderTypeId { get; set; } = -1; public int ObjectHeaderId { get; set; } public int ObjectTypeId { get; set; } = -1; public int ObjectId { get; set; } public int BizTransactionTypeId { get; set; } = -1; public int ItemId { get; set; } = -1; public int SkuId { get; set; } = -1; public DateTime DocumentDate { get; set; } = DateTime.UtcNow; // Per-(ObjectHeader,Object) running sequence — TITEMREASON's unique constraint is // (ObjectHeaderTypeId, ObjectHeaderId, ObjectTypeId, ObjectId, BizTransactionTypeId, SlNo), // so this must be assigned server-side per detail line, not copied from the caller's // WO-stage matching key (see DetailSlNo below). public short SlNo { get; set; } public int ReasonId { get; set; } = -1; public decimal GoodQuantity { get; set; } public decimal RejectedQuantity { get; set; } public decimal ReworkQuantity { get; set; } public decimal OtherQuantity { get; set; } public string Remarks { get; set; } = string.Empty; public int LotId { get; set; } = -1; // Not persisted — the WO-stage SlNo the caller uses to say which ProductionDetailSaveDTO // this reason row belongs to, mirroring ProductionStoppageSaveDTO/ProductionResourceSaveDTO's // existing match-by-SlNo convention. Resolved to ObjectId (ProductionDetailId) in the BLL. public short DetailSlNo { get; set; } } }