using System.Data.Common; using EntitlementDAL.DTOs; using GB5Shared.DTO.Framework.Login; namespace EntitlementDAL.Interfaces; public interface IBetaClientDAL { Task> GetListAsync(LoginDTO login, CancellationToken ct); Task> GetListByClientAsync(int clientId, LoginDTO login, CancellationToken ct); Task> GetOpenProgramsAsync(DateTime now, LoginDTO login, CancellationToken ct); Task IsClientInProgramAsync(int clientId, string betaProgramName, DateTime now, LoginDTO login, CancellationToken ct); Task SaveAsync(BetaClientDTO dto, LoginDTO login, DbTransaction tx, CancellationToken ct); Task DeleteAsync(int betaClientId, LoginDTO login, DbTransaction tx, CancellationToken ct); Task> GetExpiredActiveAsync(DateTime now, LoginDTO login, CancellationToken ct); /// Finds a client's enrollment row for a program regardless of Status (Active or /// soft-deleted) — the unique key (ClientId, BetaProgramName) is not filtered by Status, so a /// prior opt-out's row must be found and reactivated on re-enrol, not duplicated. Task GetByClientAndProgramAsync(int clientId, string betaProgramName, LoginDTO login, CancellationToken ct); Task ReactivateAsync(int betaClientId, DateTime validFrom, DateTime validUntil, LoginDTO login, DbTransaction tx, CancellationToken ct); }