14 lines
639 B
C#
14 lines
639 B
C#
|
|
using SIGCM2.Domain.Entities;
|
||
|
|
|
||
|
|
namespace SIGCM2.Application.Abstractions.Persistence;
|
||
|
|
|
||
|
|
public interface IRolRepository
|
||
|
|
{
|
||
|
|
Task<IReadOnlyList<Rol>> ListAsync(CancellationToken ct = default);
|
||
|
|
Task<Rol?> GetByCodigoAsync(string codigo, CancellationToken ct = default);
|
||
|
|
Task<bool> ExistsActiveByCodigoAsync(string codigo, CancellationToken ct = default);
|
||
|
|
Task<int> AddAsync(Rol rol, CancellationToken ct = default);
|
||
|
|
Task<bool> UpdateAsync(string codigo, string nombre, string? descripcion, bool activo, CancellationToken ct = default);
|
||
|
|
Task<bool> HasActiveUsuariosAsync(string codigo, CancellationToken ct = default);
|
||
|
|
}
|