namespace PowderCoating.Core.Entities { /// /// Represents a reusable item in the product catalog that can be quickly added to quotes. /// Stores default values for common powder coating jobs. /// public class CatalogItem : BaseEntity { /// /// Gets or sets the item name. /// public string Name { get; set; } = string.Empty; /// /// Gets or sets the optional item description. /// public string? Description { get; set; } /// /// Gets or sets the optional SKU (Stock Keeping Unit) or item code. /// public string? SKU { get; set; } /// /// Gets or sets the category ID this item belongs to. /// public int CategoryId { get; set; } /// /// Gets or sets the category navigation property. /// public virtual CatalogCategory Category { get; set; } = null!; /// /// Gets or sets the default price for this item. /// Can be overridden when added to a quote. /// public decimal DefaultPrice { get; set; } /// /// Gets or sets whether this item typically requires sandblasting. /// public bool DefaultRequiresSandblasting { get; set; } /// /// Gets or sets whether this item typically requires masking/taping. /// public bool DefaultRequiresMasking { get; set; } /// /// Gets or sets the estimated processing time in minutes. /// public int? DefaultEstimatedMinutes { get; set; } /// /// Gets or sets the approximate surface area in square feet (or square meters if using metric). /// public decimal? ApproximateArea { get; set; } /// /// Gets or sets the display order for sorting items within a category. /// Lower numbers appear first. /// public int DisplayOrder { get; set; } /// /// Gets or sets whether this item is currently active and visible. /// public bool IsActive { get; set; } = true; /// /// When true, this item is retail merchandise available for direct sale on an invoice /// without a job (e.g. branded apparel, cleaning products). Inherited from the category /// by default but can be overridden per item. /// public bool IsMerchandise { get; set; } = false; /// /// Optional link to an inventory item so stock is decremented when this item is sold. /// public int? InventoryItemId { get; set; } public virtual InventoryItem? InventoryItem { get; set; } // ── Financial Account Mapping ────────────────────────────────────────── /// /// Gets or sets the revenue account ID for invoicing this item. /// When null, falls back to the default revenue account. /// public int? RevenueAccountId { get; set; } /// /// Gets or sets the COGS account ID for recording material cost when this item is used. /// When null, falls back to the default COGS account. /// public int? CogsAccountId { get; set; } public virtual Account? RevenueAccount { get; set; } public virtual Account? CogsAccount { get; set; } // ── Images ──────────────────────────────────────────────────────────── /// /// Blob path of the full-size uploaded image, relative to the catalogimages container. /// Null when no image has been uploaded. /// public string? ImagePath { get; set; } /// /// Blob path of the 200×200 thumbnail generated on upload. /// Null when no image has been uploaded. /// public string? ThumbnailPath { get; set; } } }