namespace App.Core.Entities.Inventory; /// Pièce détachée du magasin. public class Part { public int Id { get; set; } public required string Reference { get; set; } public required string Designation { get; set; } /// /// Quantité en stock, dénormalisée pour un accès rapide côté UI/dashboard. /// Source de vérité recalculable à tout moment depuis . /// public double QuantityInStock { get; set; } public double AlertThreshold { get; set; } public string? Location { get; set; } public int? PrimarySupplierId { get; set; } public Supplier? PrimarySupplier { get; set; } public decimal UnitPrice { get; set; } public int? PhotoAttachmentId { get; set; } public bool IsActive { get; set; } = true; }