Knocks/BackEnd/Knoks.Core/Data/Interfaces/IUserDao.cs

25 lines
1.0 KiB
C#

using System.Collections.Generic;
using Knoks.Core.Entities;
using System.Threading.Tasks;
using Knoks.Core.Entities.Args;
namespace Knoks.Core.Data.Interfaces
{
public interface IUserDao
{
Task<(User user, Account account)> CreateUser(CreateUserArgs args, string password, decimal freeCreditAmount);
Task<bool> UserEmailExists(string email);
Task<bool> UserNameExists(string userName, long? userId);
Task<User> UpdateUser(UpdateUserArgs args);
Task<IEnumerable<User>> GetUsers(long? userId = null, byte? userType = null);
Task<User> GetUser(long userId);
Task<User> GetUserByEmail(string email);
Task<UserCredential> GetUserCredential(int apiConsumerId, string username);
Task<UserAccounts> GetUserInfo(string accountWalletAddress);
Task<bool> CheckPasswordResetToken(string token);
Task SendPasswordResetLink(string email, string token);
Task<bool> PasswordReset(string token, string newPassword);
Task<User> UpdateUserSucsess(long args);
}
}