namespace Modules.User.Application.Gateways;

public interface IPermissionRepository
{
    Task<Domain.Entities.Access.Permission?> GetByCodeAsync(string code, CancellationToken cancellationToken);
    Task<Domain.Entities.Access.Permission?> GetByNameAsync(string permissionName, CancellationToken cancellationToken);
    Task<Domain.Entities.Access.Permission?> GetAsync(int permissionId, CancellationToken cancellationToken = default);
    ValueTask<bool> ExistsAllAsync(IEnumerable<int> permissionIds, CancellationToken cancellationToken);
    Task AddAsync(Domain.Entities.Access.Permission permission, CancellationToken cancellationToken = default);
    Task SaveAsync(Domain.Entities.Access.Permission permission, CancellationToken ct = default);
}