2026-08-19 23:25:08 +07:00
|
|
|
using mws.backend.dotnet.application.Common;
|
2026-09-13 18:02:09 +07:00
|
|
|
using mws.backend.dotnet.application.Users;
|
2026-08-19 23:25:08 +07:00
|
|
|
using mws.backend.dotnet.domain.Users;
|
2026-08-13 23:10:22 +07:00
|
|
|
|
2026-08-19 23:25:08 +07:00
|
|
|
namespace mws.backend.dotnet.application.Common.Repositories;
|
2026-08-13 23:10:22 +07:00
|
|
|
|
|
|
|
|
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);
|
2026-08-19 23:25:08 +07:00
|
|
|
Task<List<Guid>> GetRoleIdsAsync(Guid userId, CancellationToken ct = default);
|
2026-08-13 23:10:22 +07:00
|
|
|
Task<List<User>> SearchWithRoleAsync(string? term, int? take, CancellationToken ct = default);
|
2026-09-13 18:02:09 +07:00
|
|
|
Task<PagedResult<User>> SearchWithRolePagedAsync(UserListFilter filter, int page, int pageSize, CancellationToken ct = default);
|
2026-08-13 23:10:22 +07:00
|
|
|
}
|