using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Analytics.Entities;

/// <summary>
/// 指标定义，描述可观测的数据点。
/// </summary>
public sealed class MetricDefinition : MultiTenantEntityBase
{
    /// <summary>
    /// 指标编码。
    /// </summary>
    public string Code { get; set; } = string.Empty;

    /// <summary>
    /// 指标名称。
    /// </summary>
    public string Name { get; set; } = string.Empty;

    /// <summary>
    /// 说明。
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 维度描述 JSON。
    /// </summary>
    public string? DimensionsJson { get; set; }

    /// <summary>
    /// 默认聚合方式。
    /// </summary>
    public string DefaultAggregation { get; set; } = "sum";
}
