using System.Data.Common; using EntitlementDAL.DTOs; using GB5Shared.DTO.Framework.Login; using GB5Shared.QueryExecutor; namespace EntitlementDAL.Interfaces; // DAL for the MENTITLEMENT table (per-subscription resolved feature grants). public interface IEntitlementGrantDAL { Task GetByIdAsync(int entitlementId, LoginDTO login, CancellationToken ct); Task> GetBySubscriptionAsync(int subscriptionId, LoginDTO login, CancellationToken ct); // Admin list (Entitlement.svc/GetList). -1 on any filter = any; isEnabled -1 = any, else 0/1. Task> GetListPagedAsync( int clientId, int featureId, int entitlementSource, int isEnabled, int offset, int pageSize, LoginDTO login, CancellationToken ct); Task GetBySubscriptionAndFeatureAsync(int subscriptionId, int featureId, LoginDTO login, CancellationToken ct); Task GetByClientAndFeatureCodeAsync(int clientId, string featureCode, LoginDTO login, CancellationToken ct); Task SaveAsync(EntitlementDTO dto, LoginDTO login, DbTransaction tx, CancellationToken ct); Task UpdateAsync(EntitlementDTO dto, LoginDTO login, DbTransaction tx, CancellationToken ct); Task DeleteAsync(int entitlementId, LoginDTO login, DbTransaction tx, CancellationToken ct); }