namespace Meezi.Core.Entities;

/// <summary>Pre-aggregated daily metrics per branch for fast dashboard reads.</summary>
public class DailyReport : TenantEntity
{
    public string BranchId { get; set; } = string.Empty;
    public DateOnly Date { get; set; }
    public decimal TotalRevenue { get; set; }
    public decimal CashRevenue { get; set; }
    public decimal CardRevenue { get; set; }
    public decimal CreditRevenue { get; set; }
    public int TotalOrders { get; set; }
    public decimal AvgOrderValue { get; set; }
    public int TotalVoids { get; set; }
    public decimal VoidAmount { get; set; }
    public decimal TotalExpenses { get; set; }
    public decimal NetIncome { get; set; }
    public List<TopProductEntry> TopProducts { get; set; } = [];
    public DateTime GeneratedAt { get; set; } = DateTime.UtcNow;

    public Branch Branch { get; set; } = null!;
}
