72 lines
2.1 KiB
C#
72 lines
2.1 KiB
C#
using SolarPower.Models;
|
||
using SolarPower.Models.User;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace SolarPower.Repository.Interface
|
||
{
|
||
public interface IUserRepository : IRepositoryBase<User>
|
||
{
|
||
/// <summary>
|
||
/// 透過Account,取得單一筆資料
|
||
/// </summary>
|
||
/// <param name="account"></param>
|
||
/// <returns></returns>
|
||
Task<User> GetOneByAccountAsync(string account);
|
||
|
||
/// <summary>
|
||
/// 透過Email,取得單一筆資料
|
||
/// </summary>
|
||
/// <param name="email"></param>
|
||
/// <returns></returns>
|
||
Task<User> GetOneByEmailAsync(string email);
|
||
|
||
/// <summary>
|
||
/// 更換密碼
|
||
/// </summary>
|
||
/// <param name="password"></param>
|
||
/// <param name="id"></param>
|
||
/// <returns></returns>
|
||
Task ChangePassword(string password, int id);
|
||
|
||
/// <summary>
|
||
/// 透過Account,取得當前登入使用者資訊
|
||
/// </summary>
|
||
/// <param name="account"></param>
|
||
/// <returns></returns>
|
||
MyUser GetMyUserInfoByAccount(string account);
|
||
|
||
/// <summary>
|
||
/// 取得單一使用者
|
||
/// </summary>
|
||
/// <param name="id"></param>
|
||
/// <returns></returns>
|
||
Task<SimpleUser> GetOneSimpleUser(int id);
|
||
|
||
/// <summary>
|
||
/// 修改個人資料
|
||
/// </summary>
|
||
/// <param name="entity"></param>
|
||
/// <param name="properties"></param>
|
||
/// <returns></returns>
|
||
Task UpdatePersonInfo(UpdateUser entity, List<string> properties);
|
||
|
||
/// <summary>
|
||
/// 更新密碼
|
||
/// </summary>
|
||
/// <param name="entity"></param>
|
||
/// <param name="properties"></param>
|
||
/// <returns></returns>
|
||
Task UpdatePassword(UpdatePassword entity, List<string> properties);
|
||
|
||
/// <summary>
|
||
/// 透過搜尋條件,查詢過濾後的使用者
|
||
/// </summary>
|
||
/// <param name="filter"></param>
|
||
/// <returns></returns>
|
||
Task<List<UserDateTable>> GetAllByFilterAsync(PostUserFilter filter);
|
||
}
|
||
}
|