using Nirvana.Common;
using Nirvana.Common.ApiBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YBDevice.Entity;

namespace YBDevice.Application
{
    /// <summary>
    /// 客户管理
    /// </summary>
    public interface IBusinessService
    {
        /// <summary>
        /// 客户列表
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        Task<PageParms<YB_Business>> GetListAsync(QueryParams param);
        /// <summary>
        /// 所有客户列表
        /// </summary>
        /// <param name="type">1-系统默认,2-小程序自助注册</param>
        /// <returns></returns>
        Task<List<YB_Business>> GetAllListAsync(int type=0);
        /// <summary>
        /// 信息提交
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitAsync(BusinessSubmitModel model);

        /// <summary>
        /// 客户详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<BusinessSubmitModel> DetailAsync(int id);

        /// <summary>
        /// 状态变更
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status"></param>
        /// <returns></returns>
       Task<ResultInfo> SetStatusAsync(int id, StatusType status);

        /// <summary>
        /// 重置密码
        /// </summary>
        /// <param name="id"></param>
        /// <param name="pwd">密码</param>
        /// <returns></returns>
        Task<ResultInfo> ResetPasswordAsync(int id, string pwd);
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> ChangePasswordAsync(BusienssPwd model);
        /// <summary>
        /// 微信登录
        /// </summary>
        /// <param name="openid">用户openid</param>
        /// <returns></returns>
        Task<ResultInfo> WXLogin(string openid);
    }
}
