using EnablementDAL.DTO; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using GB5Shared.DTO.Framework.ResponseStandard; namespace EnablementBLL.ShowRule; public interface IShowRuleBLL { bool Evaluate( IEnumerable rulesForShow, byte ruleCategory, ResolverContextDTO context, IEnumerable userRoles); // Per-rule relevance tally (Matched/Total) across ALL of a show's active rules, // regardless of category/group — used by ResolveShowMatches ("System A") to // score/rank candidates. Distinct from Evaluate(), which is a pass/fail GATE // per rule category (AND across groups, OR within a group) for ResolveShow // ("System B"). Returns (0, 0) when the show has no rules — caller treats // that as a perfect/universal match (score = 1.0), same "no rules ⇒ pass" // convention as Evaluate(). (int Matched, int Total) EvaluateDetailed( IEnumerable rulesForShow, ResolverContextDTO context, IEnumerable userRoles); // ---- Admin CRUD (author-time) ---- Task GetShowRuleAsync(int showRuleId, LoginDTO loginDTO); Task GetShowRuleList(CriteriaDTO criteriaDTO, LoginDTO loginDTO); Task SaveShowRuleAsync( ShowRuleDTO dto, LoginDTO login, CancellationToken ct); Task> DeleteShowRuleAsync(int showRuleId, LoginDTO login, CancellationToken ct); // Channel-owned rules — used by ShowChannelSubscriptionBLL, not the resolver. Task> GetShowRulesForChannelAsync(int channelId, LoginDTO login, CancellationToken ct); // Space-owned rules — used by ShowSpaceSubscriptionBLL, not the resolver. Task> GetShowRulesForSpaceAsync(int spaceId, LoginDTO login, CancellationToken ct); }