using Modules.User.Domain.Entities.Access;

namespace Modules.User.Application.Gateways;

public interface IRoleRepository
{
    Task<Role?> GetAsync(int roleId, CancellationToken cancellationToken);
    Task<Role?> GetByNameAsync(string name, CancellationToken cancellationToken);
    Task<bool> ExistsWithPermissionAsync(int permissionId, CancellationToken cancellationToken);
    Task AddAsync(Role role, CancellationToken cancellationToken = default);
    Task SaveAsync(Role role, CancellationToken ct = default);
}