namespace Meezi.Core.Entities;

public class Ingredient : TenantEntity
{
    public string Name { get; set; } = string.Empty;
    public string Unit { get; set; } = "عدد";
    public decimal QuantityOnHand { get; set; }
    public decimal ReorderLevel { get; set; }
    /// <summary>Cost per unit (Toman) for COGS reporting.</summary>
    public decimal UnitCost { get; set; }
    /// <summary>Target / full stock level used with warning percent (e.g. 500 g).</summary>
    public decimal ParLevel { get; set; }
    /// <summary>Warn when on-hand falls below ParLevel × (this ÷ 100). Default 20 = 20%.</summary>
    public decimal LowStockWarningPercent { get; set; } = 20m;

    public Cafe Cafe { get; set; } = null!;
    public ICollection<StockMovement> Movements { get; set; } = [];
    public ICollection<MenuItemIngredient> MenuItemRecipes { get; set; } = [];
}
