Rebuild data storage system so that database dependencies get taken into account
This commit is contained in:
28
src/HopFrame.Database/Repositories/IUserRepository.cs
Normal file
28
src/HopFrame.Database/Repositories/IUserRepository.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using HopFrame.Database.Models;
|
||||
|
||||
namespace HopFrame.Database.Repositories;
|
||||
|
||||
public interface IUserRepository {
|
||||
Task<IList<User>> GetUsers();
|
||||
|
||||
Task<User> GetUser(Guid userId);
|
||||
|
||||
Task<User> GetUserByEmail(string email);
|
||||
|
||||
Task<User> GetUserByUsername(string username);
|
||||
|
||||
Task<User> AddUser(User user);
|
||||
|
||||
/// <summary>
|
||||
/// IMPORTANT:<br/>
|
||||
/// This function does not add or remove any permissions to the user.
|
||||
/// For that please use <see cref="IPermissionRepository"/>
|
||||
/// </summary>
|
||||
Task UpdateUser(User user);
|
||||
|
||||
Task DeleteUser(User user);
|
||||
|
||||
Task<bool> CheckUserPassword(User user, string password);
|
||||
|
||||
Task ChangePassword(User user, string password);
|
||||
}
|
||||
Reference in New Issue
Block a user