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

namespace YBDevice.NApi.Application.ThirdClient
{
    /// <summary>
    /// 第三方相关处理
    /// </summary>
    public interface IOpenService
    {
        /// <summary>
        /// BMI计算
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> CalcBmiAsync(BmiInfoC2SDto data);
        /// <summary>
        /// 身高预测
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> CalcPredictHeightAsync(HeightInfoC2SDto data);
        /// <summary>
        /// 登录接口
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> OnLoginAsync(TouTiaoLoginC2SDto data);
        /// <summary>
        /// 获取测量记录列表
        /// </summary>
        /// <param name="familyid">家庭成员ID</param>
        /// <param name="page">页码</param>
        /// <param name="pagesize">每页显示数量</param>
        /// <returns></returns>
        Task<ResultInfo> GetResultListAsync(Guid familyid, int page,int pagesize);
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="familyid">家庭成员ID</param>
        /// <returns></returns>
        Task<ResultInfo> GetUserInfoAsync(Guid? familyid);
        /// <summary>
        /// 添加测量记录
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> AddResultAsync(InsertResultC2SDto data);

        /// <summary>
        /// 解密用户资料,如果未注册则自动进行注册,否则更新资料
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> DecryptDataAsync(DecryptUserInfoC2SDto data);
        /// <summary>
        /// 退出登录
        /// </summary>
        /// <param name="sessionId"></param>
        /// <returns></returns>
        Task<ResultInfo> OutLoginAsync(string sessionId);
        /// <summary>
        /// 修改用户资料
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitUserInfoAsync(SumitUserInfoC2SDto data);

        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> RegisterAsync(SubmitUserInfoC2SDto data);
    }
}
