using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using YGNT.Exam.Roles.Dto;
using YGNT.Exam.Users.Dto;

namespace YGNT.Exam.Users
{
    public interface IUserAppService : IAsyncCrudAppService<UserDto, long, PagedUserResultRequestDto, CreateUserDto, UserDto>
    {
        Task<ListResultDto<RoleDto>> GetRoles();

        Task ChangeLanguage(ChangeUserLanguageDto input);

        Task<bool> ChangePassword(ChangePasswordDto input);

        /// <summary>
        /// 分配角色
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <param name="roleName">角色名称(选中的全部)</param>
        /// <returns></returns>
        Task SetRoles(long userId, List<string> roleName);

        /// <summary>
        /// 是否启用
        /// </summary>
        /// <param name="userId">用户Id</param>
        /// <param name="isActive">是否启用</param>
        /// <returns></returns>
        Task Activate(long userId, bool isActive);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="userIdList"></param>
        /// <returns></returns>
        Task DeleteList(List<long> userIdList);
    }
}
