namespace AnalyticsDAL.DTO.AnalysisQuery
{
/// One MANALYSISQUERYFIELDS row shaped for the BI engine's dimension/measure
/// picker (BICatalogBLL.GetDimensionsForDataset/GetMeasuresForDataset's AnalysisQuery
/// branch) — deliberately not AnalysisQueryFieldsDTO (the legacy designer's own, much
/// wider shape); this is just the handful of columns the picker needs.
public class AnalysisQueryFieldPickerDTO
{
public string Field { get; set; } = string.Empty;
public string Label { get; set; } = string.Empty;
/// DBOBJECTFIELDS.DBFIELDATATYPE's own numbering (0 numeric,1 varchar,
/// 2 nvarchar,3 datetime,6 int,7 tinyint,8 smallint — confirmed via
/// EntityCreationEngine.cs's own CASE mapping) — NOT the same convention as
/// MREPORTVSFIELDS.FIELDTYPE/WarehouseDimensionDTO.DataType (0 Int,1 String,2 Long,
/// 3 Date,4 Bool,6 Double). Translate via BICatalogBLL.TranslateDbFieldDataType
/// before handing this to the FE picker — never pass through unchanged.
public byte RawDataType { get; set; }
/// Measures only — same 0 None,1 SUM,3 AVG,5 COUNT,7 MAX,8 MIN convention
/// already used by MWAREHOUSEMEASURE/MBIFIELDMAPPING (confirmed identical via
/// AnalysisDAL.cs's own aggregation switch).
public byte? Aggregation { get; set; }
}
}