namespace CutList.Web.Data.Entities; /// /// Represents stock allocated to a specific job. /// Can reference an existing StockItem with quantity override, /// or define a custom length just for this job. /// public class JobStock { public int Id { get; set; } public int JobId { get; set; } public int MaterialId { get; set; } /// /// If set, references an existing stock item. Null for custom job-specific lengths. /// public int? StockItemId { get; set; } /// /// Length in inches. For stock items, copied from StockItem.LengthInches. /// For custom lengths, user-specified. /// public decimal LengthInches { get; set; } /// /// Quantity to use for this job. Can be less than or equal to available stock. /// For custom lengths, represents unlimited available. /// public int Quantity { get; set; } = 1; /// /// True if this is a custom length just for this job (not from inventory). /// public bool IsCustomLength { get; set; } /// /// Priority for bin packing. Lower values are used first. /// public int Priority { get; set; } = 10; public int SortOrder { get; set; } public Job Job { get; set; } = null!; public Material Material { get; set; } = null!; public StockItem? StockItem { get; set; } }