namespace AccountsDAL.DTO.Warehouse { public class WarehouseFactAdminDTO { public int FactId { get; set; } public string FactCode { get; set; } = string.Empty; public string FactName { get; set; } = string.Empty; public string FactTableName { get; set; } = string.Empty; public string? GrainDescription { get; set; } public string DateDimColumn { get; set; } = "DATEID"; public string OuDimColumn { get; set; } = "OUID"; public string? BusinessDescription { get; set; } public string? Synonyms { get; set; } public int SortOrder { get; set; } public int SourceType { get; set; } public int TenantId { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } public int Status { get; set; } } public class SaveWarehouseFactDTO { public int FactId { get; set; } // 0 = new public string FactCode { get; set; } = string.Empty; public string FactName { get; set; } = string.Empty; public string FactTableName { get; set; } = string.Empty; public string? GrainDescription { get; set; } public string DateDimColumn { get; set; } = "DATEID"; public string OuDimColumn { get; set; } = "OUID"; public string? BusinessDescription { get; set; } public string? Synonyms { get; set; } public int SortOrder { get; set; } = 9999; public int SourceType { get; set; } = 2; // 2 = client-created // Server-side — BLL fills from LoginDTO; not accepted from the caller public int TenantId { get; set; } public int CreatedById { get; set; } public int ModifiedById { get; set; } } public class WarehouseMeasureAdminDTO { public int MeasureId { get; set; } public int FactId { get; set; } public string MeasureCode { get; set; } = string.Empty; public string MeasureName { get; set; } = string.Empty; public string ColumnName { get; set; } = string.Empty; public int DataType { get; set; } public int AdditivityType { get; set; } public string? SemiAdditiveDimension { get; set; } public int DefaultAggregation { get; set; } public string? FormatString { get; set; } public string? BusinessDescription { get; set; } public string? Synonyms { get; set; } public int IsVisible { get; set; } // TINYINT: 1=visible, 0=hidden public int SortOrder { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } public int Status { get; set; } } public class SaveWarehouseMeasureDTO { public int MeasureId { get; set; } // 0 = new public int FactId { get; set; } public string MeasureCode { get; set; } = string.Empty; public string MeasureName { get; set; } = string.Empty; public string ColumnName { get; set; } = string.Empty; public int DataType { get; set; } = 6; // 6 = DOUBLE default public int AdditivityType { get; set; } = 0; // 0 = Additive default public string? SemiAdditiveDimension { get; set; } public int DefaultAggregation { get; set; } = 1; // 1 = SUM default public string? FormatString { get; set; } public string? BusinessDescription { get; set; } public string? Synonyms { get; set; } public int IsVisible { get; set; } = 1; public int SortOrder { get; set; } = 9999; // Server-side — BLL fills from LoginDTO public int CreatedById { get; set; } public int ModifiedById { get; set; } } public class WarehousePostingRuleAdminDTO { public int PostingRuleId { get; set; } public int MeasureId { get; set; } public string MeasureCode { get; set; } = string.Empty; public string MeasureName { get; set; } = string.Empty; public int SourceType { get; set; } public int? NatureColumnType { get; set; } public string? NatureValues { get; set; } public string? AccountTypeFilter { get; set; } public int? AggregationMode { get; set; } public int? SignConvention { get; set; } public string? FormulaExpression { get; set; } public bool IsActive { get; set; } public int Version { get; set; } public int Status { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } } public class SaveWarehousePostingRuleDTO { public int PostingRuleId { get; set; } // 0 = new public int MeasureId { get; set; } public int SourceType { get; set; } // 0=NatureBucket, 1=DerivedFormula public int? NatureColumnType { get; set; } public string? NatureValues { get; set; } public string? AccountTypeFilter { get; set; } public int? AggregationMode { get; set; } public int? SignConvention { get; set; } public string? FormulaExpression { get; set; } public bool IsActive { get; set; } = true; // Server-side — BLL fills from LoginDTO public int CreatedById { get; set; } public int ModifiedById { get; set; } } }