using AnalyticsDAL.DTO.Warehouse; namespace AnalyticsDAL.DTO.BIFieldMapping { /// Maps one row of MBIFIELDMAPPING — the ApiService-kind counterpart to /// WarehouseMeasureDTO: one field a conventional report/service exposes, classified as a /// dimension or a measure, with the same additivity/aggregation registry Warehouse-kind /// measures already get from MWAREHOUSEMEASURE. public class BIFieldMappingDTO { public int BIFieldMappingId { get; set; } public int BICatalogId { get; set; } public string SourceFieldName { get; set; } = string.Empty; public byte MappedAs { get; set; } // 0 Dimension, 1 Measure, 2 Computed public string Label { get; set; } = string.Empty; public byte DataType { get; set; } public byte? DefaultAggregation { get; set; } public AdditivityType? AdditivityType { get; set; } public string? SemiAdditiveDimension { get; set; } public bool IsVisible { get; set; } // Not read by GET_DIMENSIONS_BY_CATALOG_ID/GET_MEASURES_BY_CATALOG_ID (both read-only // pickers) — needed now that BIFieldMappingBLL.SaveMapping (Phase 2) is the first code // path to actually INSERT a row. public short SortOrder { get; set; } public int CreatedById { get; set; } public int ModifiedById { get; set; } // Non-null only for MappedAs=2 (Computed) rows -- for those, SourceFieldName doubles as // the emitted result key (not a physical source column). Evaluated post-resolution by // GB5Shared/Export/ComputedFieldEvaluator.cs via AnalyticsBLL/AnalysisAggregation/ // ComputedFieldPlanner.cs. public string? ComputeExpression { get; set; } public bool IsComputed => MappedAs == 2; } }