namespace EnablementDAL.DTO; public class ShowRuleDTO { public int ShowRuleId { get; set; } public int ShowId { get; set; } = -1; // TSHOWRULE is polymorphic — a rule belongs to exactly one owner: ShowId, ChannelId, // OR SpaceId (never more than one, never none; enforced by // CK_TSHOWRULE_OwnerExactlyOne). Channel/Space targeting lets // ShowChannelSubscriptionBLL/ShowSpaceSubscriptionBLL reuse ShowRuleBLL.Evaluate() // as-is for audience eligibility (AutoSubscribeRule=ByRole/ByOU) instead of a second // targeting mechanism. public int ChannelId { get; set; } = -1; public int SpaceId { get; set; } = -1; public int TenantId { get; set; } public byte RuleCategory { get; set; } // 1=Scope, 2=Audience, 3=Trigger public short RuleGroup { get; set; } // Grouping key for OR/AND logic public string RuleKey { get; set; } = string.Empty; public byte RuleOperator { get; set; } // 0=Equals, 1=In, 2=NotEquals, 3=StartsWith public string RuleValue { get; set; } = string.Empty; public byte IsActive { get; set; } = 1; public string Remarks { get; set; } = string.Empty; public short Version { get; set; } public byte Status { get; set; } public short SortOrder { get; set; } public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } public byte SourceType { get; set; } }