using System; namespace AccountsDAL.DTO.WarehousePostingRule { // CRUD-shaped DTO for MWAREHOUSEMEASUREPOSTINGRULE admin endpoints (Get/Save/Delete). // Deliberately separate from AccountsDAL.DTO.Warehouse.WarehouseMeasurePostingRuleDTO, which is // the lean read-shape the posting engine (WarehouseFactPostingDAL) hydrates rules into — that // DTO has no Version/Status/CreatedById/ModifiedById because the engine only ever reads active // rules, never writes this table. Keeping them separate means a CRUD-only field never needs to // flow through the posting engine's hot path, and vice versa. public class WarehousePostingRuleDTO { #region PrivateMembers #region WarehousePostingRule private int postingruleid; private int measureid; private string measurecode; // MWAREHOUSEMEASURE.MEASURECODE, read-only, joined for display private byte sourcetype; // 0 NatureBucketAggregation, 1 DerivedFormula private byte? naturecolumntype; // 0 ACCOUNTSCHEDULENATURE, 1 ACCOUNTGROUPNATURE private string? naturevalues; private string? accounttypefilter; private byte? aggregationmode; // 0 PeriodFlow,1 AsOfBalance,2 AsOfBalanceDebitOnly,3 AsOfBalanceCreditOnly private byte? signconvention; // 0 DebitPositive, 1 CreditPositive private string? formulaexpression; private bool isactive; #endregion #region Base private int postingrulecreatedbyid; private DateTime postingrulecreatedon; private int postingrulemodifiedbyid; private DateTime postingrulemodifiedon; #endregion #region Standard private byte postingrulestatus; // 0.Pending, 1.Active, 2.Deleted, 3.Amended, 4.Inactive, 5.Archived private Int16 postingruleversion; #endregion #endregion #region PublicMembers #region WarehousePostingRule public int PostingRuleId { get { return postingruleid; } set { postingruleid = value; } } public int MeasureId { get { return measureid; } set { measureid = value; } } public string MeasureCode { get { return measurecode; } set { measurecode = value; } } public byte SourceType { get { return sourcetype; } set { sourcetype = value; } } public byte? NatureColumnType { get { return naturecolumntype; } set { naturecolumntype = value; } } public string? NatureValues { get { return naturevalues; } set { naturevalues = value; } } public string? AccountTypeFilter { get { return accounttypefilter; } set { accounttypefilter = value; } } public byte? AggregationMode { get { return aggregationmode; } set { aggregationmode = value; } } public byte? SignConvention { get { return signconvention; } set { signconvention = value; } } public string? FormulaExpression { get { return formulaexpression; } set { formulaexpression = value; } } public bool IsActive { get { return isactive; } set { isactive = value; } } #endregion #region Base public int PostingRuleCreatedById { get { return postingrulecreatedbyid; } set { postingrulecreatedbyid = value; } } public DateTime PostingRuleCreatedOn { get { return postingrulecreatedon; } set { postingrulecreatedon = value; } } public int PostingRuleModifiedById { get { return postingrulemodifiedbyid; } set { postingrulemodifiedbyid = value; } } public DateTime PostingRuleModifiedOn { get { return postingrulemodifiedon; } set { postingrulemodifiedon = value; } } #endregion #region Standard public byte PostingRuleStatus { get { return postingrulestatus; } set { postingrulestatus = value; } } public Int16 PostingRuleVersion { get { return postingruleversion; } set { postingruleversion = value; } } #endregion #endregion } }