using Long.Common.Basedata;
using Long.Core.Query;

namespace Long.Service.UserService.Basedata
{
    /// <summary>
    /// 用户·服务接口
    /// </summary>
    public interface IUserService
    {
        /// <summary>
        /// 获取全部系统用户
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<User>> Get();

        /// <summary>
        /// 通过条件获取列表
        /// </summary>
        /// <param name="queryParamenter"></param>
        /// <returns></returns>
        Task<IEnumerable<User>> Get(QueryParamenter queryParamenter);

        /// <summary>
        /// 通过 Id 获取系统用户实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<User> GetById(long id);

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <returns></returns>
        Task<User> GetByUserName(string userName);

        /// <summary>
        /// 注册用户
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<long> Regist(RegistInput input);

        /// <summary>
        /// 更新密码
        /// </summary>
        /// <param name="id">内码</param>
        /// <param name="password">新密码</param>
        /// <returns>记录更新数</returns>
        Task<int> UpdatePassword(long id, string password);
    }
}
