namespace AccountsDAL.DTO.Warehouse { public class WarehouseMeasurePostingRuleDTO { public int PostingRuleId { get; set; } public int MeasureId { get; set; } public string MeasureCode { get; set; } = string.Empty; public string ColumnName { get; set; } = string.Empty; // 0 = NatureBucketAggregation, 1 = DerivedFormula public byte SourceType { get; set; } // SourceType = 0 fields public byte? NatureColumnType { get; set; } // 0 = ACCOUNTSCHEDULENATURE, 1 = ACCOUNTGROUPNATURE public string? NatureValues { get; set; } public string? AccountTypeFilter { get; set; } public byte? AggregationMode { get; set; } // 0 PeriodFlow,1 AsOfBalance,2 DebitOnly,3 CreditOnly public byte? SignConvention { get; set; } // 0 DebitPositive, 1 CreditPositive // SourceType = 1 field public string? FormulaExpression { get; set; } // 1:N combination — determines how multiple rules for the same MeasureCode are merged // 0 = Add (default), 1 = Subtract. SORTORDER controls evaluation sequence. public byte CombinationMode { get; set; } public int SortOrder { get; set; } // SourceType = 2 (ModuleAggregation) fields — domain-neutral source table path public string? SourceTable { get; set; } public string? SourceDateColumn { get; set; } public string? SourceOuColumn { get; set; } public string? SourceAmtColumn { get; set; } public string? FilterJson { get; set; } // JSON: {"STATUS":1,"TYPE":2} equality conditions } }