using AnalyticsDAL.DTO.Warehouse;
namespace AnalyticsDAL.DTO.AnalysisAggregation.V1
{
public class AnalysisMeasureDefinitionDTO
{
/// For Warehouse-kind datasets: the measure's ColumnName on the fact table
/// (must match a MWAREHOUSEMEASURE row for the resolved fact). For AnalysisQuery/
/// ApiService-kind datasets: whatever field name that source uses.
public string Field { get; set; } = string.Empty;
public string Label { get; set; } = string.Empty;
/// Reuses AnalysisQB/MREPORTVIEWFIELDS numbering: 0 None,1 SUM,3 AVG,5 COUNT,7 MAX,8 MIN.
public byte Aggregation { get; set; }
public string? Format { get; set; }
/// Populated from MWAREHOUSEMEASURE.ADDITIVITYTYPE for Warehouse-kind datasets
/// (echoed back in AnalysisResult.Meta for the frontend's ChartRecommenderService, Phase 2+);
/// defaults to Additive for AnalysisQuery/ApiService-kind datasets, which have no
/// classification metadata yet.
public AdditivityType Additivity { get; set; } = AdditivityType.Additive;
/// Only meaningful when Additivity == SemiAdditive.
public string? SemiAdditiveDimension { get; set; }
}
}