namespace EnablementDAL.DTO; // TSHOWSUBSCRIPTION (OBJECTTYPEID=2) — override rows only. Mandatory/Auto-subscribed // eligibility is computed live from the user's current role/OU (see // ShowSpaceSubscriptionBLL); this row only exists when a user has explicitly deviated // from that computed default (opted out of an Auto-subscribed Space, or opted in to an // Optional one). public class ShowSpaceSubscriptionDTO { public int SubscriptionId { get; set; } public int SpaceId { 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 Subscriptions" FE popover's Spaces section — one row per Space // visible to the current user, with effective (override-or-computed) subscription state // already resolved. public class MySpaceDTO { public int SpaceId { get; set; } public string SpaceCode { get; set; } = string.Empty; public string SpaceName { get; set; } = string.Empty; public string Description { get; set; } = string.Empty; public string Icon { get; set; } = string.Empty; public string ColorHex { 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 Space, with the target user's display name. public class SpaceSubscriptionOverrideDTO { public int SubscriptionId { get; set; } public int SpaceId { 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 ForceSpaceSubscriptionDTO { public int SpaceId { get; set; } public int UserId { get; set; } public bool IsSubscribed { get; set; } public bool IsLocked { get; set; } }