15 lines
716 B
C#
15 lines
716 B
C#
using Mws.Domain.Users;
|
|||
|
|
|
||
|
|
namespace Mws.Application.Common.Repositories;
|
||
|
|
|
||
|
|
public interface IUserRepository : IRepository<User>
|
||
|
|
{
|
||
|
|
Task<User?> GetByIdAsync(Guid id, CancellationToken ct = default);
|
||
|
|
Task<User?> GetByIdWithRoleAsync(Guid id, CancellationToken ct = default);
|
||
|
|
Task<User?> GetByUsernameWithRoleAsync(string username, CancellationToken ct = default);
|
||
|
|
Task<bool> ExistsByUsernameAsync(string username, CancellationToken ct = default);
|
||
|
|
Task<bool> ExistsByRoleIdAsync(Guid roleId, CancellationToken ct = default);
|
||
|
|
Task<Guid> GetRoleIdAsync(Guid userId, CancellationToken ct = default);
|
||
|
|
Task<List<User>> SearchWithRoleAsync(string? term, int? take, CancellationToken ct = default);
|
||
|
|
}
|