namespace EnablementDAL.DTO; // TSHOWCHANNELSUBSCRIPTION — override rows only. Mandatory/Auto-subscribed eligibility // is computed live from the user's current role/OU (see ShowChannelSubscriptionBLL); this // row only exists when a user has explicitly deviated from that computed default (opted // out of an Auto-subscribed channel, or opted in to an Optional one). public class ShowChannelSubscriptionDTO { public int SubscriptionId { get; set; } public int ChannelId { get; set; } public int UserId { get; set; } public bool IsSubscribed { get; set; } public bool IsLocked { get; set; } public byte SubscriptionSource { get; set; } // 0=Self, 1=AdminForced public DateTime SubscribedOn { get; set; } public string Remarks { get; set; } = string.Empty; public short Version { get; set; } public byte Status { get; set; } = 1; 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; } public int TenantId { get; set; } } // Shaped for the "My Channels" FE popover — one row per channel visible to the current // user, with effective (override-or-computed) subscription state already resolved. public class MyChannelDTO { public int ChannelId { get; set; } public string ChannelCode { get; set; } = string.Empty; public string ChannelName { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; public byte SubscriptionType { get; set; } // 0=Mandatory, 1=Auto-subscribed, 2=Optional public bool IsSubscribed { get; set; } // effective — override if present, else computed default public bool CanToggle { get; set; } // false for Mandatory, or when an admin has locked the override } // Admin visibility row — one override for one channel, with the target user's display name. public class ChannelSubscriptionOverrideDTO { public int SubscriptionId { get; set; } public int ChannelId { get; set; } public int UserId { get; set; } public string UserName { get; set; } = string.Empty; public bool IsSubscribed { get; set; } public bool IsLocked { get; set; } public byte SubscriptionSource { get; set; } // 0=Self, 1=AdminForced } // Mutation payload for the admin force-subscribe action — one DTO param per this repo's // "mutate methods take a single DTO, never loose scalars" rule. public class ForceChannelSubscriptionDTO { public int ChannelId { get; set; } public int UserId { get; set; } public bool IsSubscribed { get; set; } public bool IsLocked { get; set; } }