15 lines
572 B
C#
15 lines
572 B
C#
using AuthHex.Models;
|
|
|
|
namespace AuthHex.Interfaces
|
|
{
|
|
public interface IRoleRepository
|
|
{
|
|
Task<Role> AddRoleAsync(Role role, CancellationToken ct = default);
|
|
Task<Role?> GetByIdAsync(Guid roleId, CancellationToken ct = default);
|
|
Task<Role?> GetByCodeAsync(string code, CancellationToken ct = default);
|
|
Task<List<Role>> ListAsync(CancellationToken ct = default);
|
|
Task<bool> IsAssignedToAnyUserAsync(Guid roleId, CancellationToken ct = default);
|
|
Task DeleteRoleAsync(Role role, CancellationToken ct = default);
|
|
}
|
|
}
|