namespace PowderCoating.Core.Entities; public class InventoryItem : BaseEntity { public string SKU { get; set; } = string.Empty; public string Name { get; set; } = string.Empty; public string? Description { get; set; } // Category (lookup-based) public int? InventoryCategoryId { get; set; } // Nullable during migration public virtual InventoryCategoryLookup? InventoryCategory { get; set; } // Legacy field for seed data (will be removed after migration) public string Category { get; set; } = string.Empty; // Powder-specific fields public string? ColorName { get; set; } public string? ColorCode { get; set; } public string? Finish { get; set; } public string? Manufacturer { get; set; } public string? ManufacturerPartNumber { get; set; } public decimal? CoverageSqFtPerLb { get; set; } // Square feet coverage per pound (default 30) public decimal? TransferEfficiency { get; set; } // Percentage of powder that sticks (default 65%) public decimal? CureTemperatureF { get; set; } // Required cure temperature in °F (recommended for oven scheduling) public int? CureTimeMinutes { get; set; } // Required hold time at cure temperature public string? ColorFamilies { get; set; } // Comma-separated primary color families e.g. "Green,Blue" public bool RequiresClearCoat { get; set; } // True if this powder requires a clear coat topcoat public string? SpecPageUrl { get; set; } // Link to manufacturer's product/spec page // Sample Panel Tracking (coating category items only) public bool HasSamplePanel { get; set; } = false; // Inventory Management public decimal QuantityOnHand { get; set; } public string UnitOfMeasure { get; set; } = "lbs"; // lbs, kg, gallons, units, etc. public decimal ReorderPoint { get; set; } public decimal ReorderQuantity { get; set; } public decimal MinimumStock { get; set; } public decimal MaximumStock { get; set; } // Pricing public decimal UnitCost { get; set; } public decimal AverageCost { get; set; } public decimal LastPurchasePrice { get; set; } public DateTime? LastPurchaseDate { get; set; } // Vendor Information public int? PrimaryVendorId { get; set; } public string? VendorPartNumber { get; set; } // Additional fields public string? Location { get; set; } public string? Notes { get; set; } public bool IsActive { get; set; } = true; public DateTime? DiscontinuedDate { get; set; } // ── Financial Account Mapping ────────────────────────────────────────── /// /// Asset account where inventory value is tracked on the balance sheet (e.g., 1200 Inventory - Powder). /// When null, falls back to the default inventory asset account. /// public int? InventoryAccountId { get; set; } /// /// COGS account debited when this material is consumed on a job (e.g., 5100 Powder & Materials). /// When null, falls back to the default COGS account. /// public int? CogsAccountId { get; set; } // Relationships public virtual Vendor? PrimaryVendor { get; set; } public virtual Account? InventoryAccount { get; set; } public virtual Account? CogsAccount { get; set; } public virtual ICollection Transactions { get; set; } = new List(); }