using Masuit.Tools.Models;
using PVDEMCS.Common.DI;
using PVDEMCS.Common;
using PVDEMCS.Services.Models;
using PVDEMCS.Services.Repositories.Entities;

namespace PVDEMCS.Services
{
    /// <summary>
    /// 用户信息 服务层 接口
    /// </summary>
    public interface ISysUserService : IDependency
    {
        /// <summary>
        /// 获取用户信息分页列表
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="activated">是否其哟个</param>
        /// <param name="page">当前页</param>
        /// <param name="size">页大小</param>
        /// <returns></returns>
        Result<PagedList<SysUser>> GetSysUserPageList(string userName, bool? activated, int page, int size);

        /// <summary>
        /// 获取用户明细
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="userName">名称</param>
        /// <returns></returns>
        Result<SysUser> GetSysUserDetail(string id, string userName);

        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        Result AddSysUser(SysUser info);

        /// <summary>
        /// 更新用户
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        Result UpdateSysUser(SysUser info);

        /// <summary>
        /// 更新用户密码
        /// </summary>
        /// <param name="id">用户id</param>
        /// <param name="pwd">密码</param>
        /// <returns></returns>
        Result UpdatePassword(string id, string pwd);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Result DeleteUser(string id);
    }
}
