using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YB.DeviceStand.Domain.Shared;

namespace YB.DeviceStand.Domain
{
    /// <summary>
    /// 基础数据
    /// </summary>
    public class BodyBaseS2SDto
    {
        /// <summary>
        /// 体重
        /// </summary>
        public decimal weight { get; set; }

        /// <summary>
        /// 身高
        /// </summary>
        public decimal height { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public int age { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        public UserSex sex { get; set; }
    }
    /// <summary>
    /// 2/4电极体脂计算请求参数
    /// </summary>
    public class BodyFat4CalcS2SDto : BodyBaseS2SDto
    {
        /// <summary>
        /// 阻抗
        /// </summary>
        public decimal adc { get; set; }
    }
    /// <summary>
    /// 2/4电极体脂计算结果
    /// </summary>
    public class BodyFat4CalcResultS2SDto : MeasureStand
    {

    }
    /// <summary>
    /// 八电极请求参数
    /// </summary>
    public class BodyFat8CalcS2SDto : BodyBaseS2SDto
    {

        /// <summary>
        /// 左手阻抗
        /// </summary>
        public decimal lefthand { get; set; }
        /// <summary>
        /// 右手阻抗
        /// </summary>
        public decimal righthand { get; set; }
        /// <summary>
        /// 左脚阻抗
        /// </summary>
        public decimal leftfoot { get; set; }
        /// <summary>
        /// 右脚阻抗
        /// </summary>
        public decimal rightfoot { get; set; }
        /// <summary>
        /// 全身阻抗
        /// </summary>
        public decimal body { get; set; }
    }

    /// <summary>
    /// 8电极体脂计算结果
    /// </summary>
    public class BodyFat8CalcResultS2SDto : UserMeasureDto
    {

    }
    /// <summary>
    /// 测量项等级
    /// </summary>
    public class MeasureLevel : UserMeasureModel
    {
        /// <summary>
        /// 脂肪率标准
        /// </summary>
        public string fat_rLevel { get; set; } = "";
        /// <summary>
        /// 肌肉率标准
        /// </summary>
        public string muscleLevel { get; set; } = "";
        /// <summary>
        /// 水份标准
        /// </summary>
        public string waterLevel { get; set; } = "";
        /// <summary>
        /// 骨量标准
        /// </summary>
        public string boneLevel { get; set; } = "";
        /// <summary>
        /// 基础代谢标准
        /// </summary>
        public string kcalLevel { get; set; } = "";
        /// <summary>
        /// 脂肪重量标准
        /// </summary>
        public string fat_wLevel { get; set; } = "";
        /// <summary>
        /// 内脂等级
        /// </summary>
        public string visceralLevel { get; set; } = "";
        /// <summary>
        /// 蛋白率标准
        /// </summary>
        public string proteinLevel { get; set; } = "";
        /// <summary>
        /// 体龄标准
        /// </summary>
        public string bodyageLevel { get; set; } = "";
        /// <summary>
        /// bmi标准
        /// </summary>
        public string bmiLevel { get; set; } = "";
        /// <summary>
        /// 肌肉量标准,和肌肉率一致
        /// </summary>
        public string musulevalLevel { get; set; } = "";
        /// <summary>
        /// 蛋白量标准,和蛋白率一致
        /// </summary>
        public string proteinvalLevel { get; set; } = "";
        /// <summary>
        /// 皮下脂肪标准
        /// </summary>
        public string sfrLevel { get; set; } = "";
        /// <summary>
        /// 体型标准
        /// </summary>
        public string bodylevel { get; set; } = "";

        /// <summary>
        /// 肥胖等级标准
        /// </summary>
        public string fatLevel { get; set; } = "";

        /// <summary>
        /// 骨骼肌量标准
        /// </summary>
        public string skeletalmuscleLevel { get; set; } = "";
    }
    /// <summary>
    /// 用户测量信息
    /// </summary>
    public class UserMeasureModel : BodyBaseS2SDto
    {
        /// <summary>
        /// 脂肪率
        /// </summary>
        public decimal fat_r { get; set; } = 0;
        /// <summary>
        /// 肌肉率
        /// </summary>
        public decimal muscle { get; set; } = 0;

        /// <summary>
        /// 水份
        /// </summary>
        public decimal water { get; set; } = 0;

        /// <summary>
        /// 骨重
        /// </summary>
        public decimal bone { get; set; } = 0;

        /// <summary>
        /// 基础代谢
        /// </summary>
        public decimal kcal { get; set; } = 0;


        /// <summary>
        /// 脂肪重量
        /// </summary>
        public decimal fat_w { get; set; } = 0;

        /// <summary>
        /// 内脂
        /// </summary>
        public decimal visceral { get; set; } = 0;

        /// <summary>
        /// 蛋白质
        /// </summary>
        public decimal protein { get; set; } = 0;


        /// <summary>
        /// 体龄
        /// </summary>
        public int bodyage { get; set; } = 0;

        /// <summary>
        /// BMI
        /// </summary>
        public decimal bmi { get; set; } = 0;

        /// <summary>
        /// 分数
        /// </summary>
        public decimal cmi { get; set; } = 0;

        /// <summary>
        /// 皮下脂肪率,%
        /// </summary>
        public decimal sfr { get; set; } = 0;
        /// <summary>
        /// 皮下脂肪量,KG
        /// </summary>
        public decimal sfrval { get; set; } = 0;

        /// <summary>
        /// 骨骼肌量,kg
        /// </summary>
        public decimal skeletalmuscle { get; set; } = 0;

        /// <summary>
        /// 肌肉量
        /// </summary>
        public decimal muscleval { get; set; } = 0;

        /// <summary>
        /// 蛋白量
        /// </summary>
        public decimal proteinval { get; set; } = 0;

        /// <summary>
        /// 去脂体重
        /// </summary>
        public decimal lbm { get; set; } = 0;

        /// <summary>
        /// 体型,参考体型枚举
        /// </summary>
        public string body { get; set; } = "";

        /// <summary>
        /// 肥胖等级,参考等级枚举
        /// </summary>
        public string fatlevlval { get; set; } = "";
    }
    /// <summary>
    /// 测量项标准
    /// </summary>
    public class MeasureStand : MeasureLevel
    {
        /// <summary>
        /// 标准体重
        /// </summary>
        public string standardWeight { get; set; } = "";

        /// <summary>
        /// 脂肪率标准范围
        /// </summary>
        public string standardfat_r { get; set; } = "";
        /// <summary>
        /// 肌肉率标准范围
        /// </summary>
        public string standardmuscle { get; set; } = "";
        /// <summary>
        /// 水份标准范围
        /// </summary>
        public string standardwater { get; set; } = "";
        /// <summary>
        /// 骨重标准范围
        /// </summary>
        public string standardbone { get; set; } = "";
        /// <summary>
        /// 基础代谢标准范围
        /// </summary>
        public string standardkcal { get; set; } = "";
        /// <summary>
        /// 脂肪重量标准范围
        /// </summary>
        public string standardfat_w { get; set; } = "";
        /// <summary>
        /// 内脂标准范围
        /// </summary>
        public string standardviscera { get; set; } = "";
        /// <summary>
        /// 蛋白质标准范围
        /// </summary>
        public string standardprotein { get; set; } = "";
        /// <summary>
        /// 体龄
        /// </summary>
        public string standardbodyage { get; set; } = "";
        /// <summary>
        /// bmi标准范围
        /// </summary>
        public string standardbmi { get; set; } = "";
        /// <summary>
        /// 皮下脂肪标准范围
        /// </summary>
        public string standardsfr { get; set; } = "";
        /// <summary>
        /// 体型标准范围
        /// </summary>
        public string standardbody { get; set; } = "";
        /// <summary>
        /// 肌肉量标准范围
        /// </summary>
        public string standardmuscleval { get; set; } = "";
        /// <summary>
        /// 蛋白量标准范围
        /// </summary>
        public string standardproteinval { get; set; } = "";
        /// <summary>
        /// 去脂体重标准范围
        /// </summary>
        public string standardlbm { get; set; } = "";
        /// <summary>
        /// 肥胖范围
        /// </summary>
        public string standardfatlevel { get; set; } = "";
    }

    /// <summary>
    /// 八电极算法接口返回数据
    /// </summary>
    public class BodyReponseInfo
    {
        /// <summary>
        /// 状态,1000测量成功,其他均是失败
        /// </summary>
        public int code { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public string status { get; set; }
        /// <summary>
        /// 信息
        /// </summary>
        public string message { get; set; }
    }
    /// <summary>
    /// 八电极算法接口返回数据
    /// </summary>
    public class BodyReponseInfo<T> : BodyReponseInfo
    {
        /// <summary>
        /// 数据
        /// </summary>
        public List<T> data { get; set; }
    }

    public class BodyResponseData
    {
        /// <summary>
        /// 参数名称
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 值
        /// </summary>
        public object value { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public BodyResponseDataDesc description { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public string unit { get; set; }
        /// <summary>
        /// 标准
        /// </summary>
        public BodyResponseDataLevel level { get; set; }
    }

    /// <summary>
    /// 参数描述
    /// </summary>
    public class BodyResponseDataDesc
    {
        /// <summary>
        /// 描述定义
        /// </summary>
        public string definition { get; set; }
        /// <summary>
        /// 提示
        /// </summary>
        public string tips { get; set; }
    }
    /// <summary>
    /// 测量项标准
    /// </summary>
    public class BodyResponseDataLevel
    {
        /// <summary>
        /// 标准值
        /// </summary>
        public string value { get; set; }
        /// <summary>
        /// 范围
        /// </summary>
        public List<string> stand { get; set; }
    }
    /// <summary>
    /// 八电极合泰请求参数
    /// </summary>
    public class HetaiBodyRequestS2SDto
    {
        /// <summary>
        /// 年龄,岁
        /// </summary>
        public int age { get; set; }
        /// <summary>
        /// 身高,厘米
        /// </summary>
        public decimal heightCm { get; set; }
        /// <summary>
        /// 人群类型,0-普通,1-运动员
        /// </summary>
        public int peopleType { get; set; }
        /// <summary>
        /// 性别,0-女,1-男
        /// </summary>
        public int sex { get; set; }
        /// <summary>
        /// 重量,公斤
        /// </summary>
        public decimal weightKg { get; set; }
        /// <summary>
        /// 左侧全⾝阻抗阻抗(悠健编码后值) 
        /// </summary>
        public decimal zLeftBodyEnCode { get; set; }
        /// <summary>
        /// 左⼿阻抗阻抗(悠健编码后值
        /// </summary>
        public decimal zLeftArmEnCode { get; set; }
        /// <summary>
        /// 左脚阻抗阻抗(悠健编码后值)
        /// </summary>
        public decimal zLeftLegEnCode { get; set; }
        /// <summary>
        /// 右⼿阻抗阻抗(悠健编码后值
        /// </summary>
        public decimal zRightArmEnCode { get; set; }
        /// <summary>
        /// 右脚阻抗阻抗(悠健编码后值
        /// </summary>
        public decimal zRightLegEnCode { get; set; }
    }

    /// <summary>
    /// 八电极测量项
    /// </summary>
    public class UserMeasureDto : MeasureLevel
    {
        /// <summary>
        /// 躯干肌肉率,%
        /// </summary>
        public decimal muscleratetrunk { get; set; } = 0;

        /// <summary>
        /// 左脚肌肉率,%
        /// </summary>
        public decimal musclerateleftleg { get; set; } = 0;

        /// <summary>
        /// 右脚肌肉率,%
        /// </summary>
        public decimal muscleraterightleg { get; set; } = 0;
        /// <summary>
        /// 左手肌肉率,%
        /// </summary>
        public decimal musclerateleftarm { get; set; } = 0;
        /// <summary>
        /// 右手肌肉率,%
        /// </summary>
        public decimal muscleraterightarm { get; set; } = 0;

        /// <summary>
        /// 躯干脂肪率,%
        /// </summary>
        public decimal bodyfatraterunk { get; set; } = 0;
        /// <summary>
        /// 左脚脂肪率,%
        /// </summary>
        public decimal bodyfatrateleftleg { get; set; } = 0;
        /// <summary>
        /// 右脚脂肪率,%
        /// </summary>
        public decimal bodyfatraterightleg { get; set; } = 0;
        /// <summary>
        /// 左手脂肪率,%
        /// </summary>
        public decimal bodyfatrateleftarm { get; set; } = 0;
        /// <summary>
        /// 右手脂肪率,%
        /// </summary>
        public decimal bodyfatraterightarm { get; set; } = 0;
        /// <summary>
        /// 躯干肌肉量,kg
        /// </summary>
        public decimal musclekgtrunk { get; set; } = 0;
        /// <summary>
        /// 左脚肌肉量,kg
        /// </summary>
        public decimal musclekgleftleg { get; set; } = 0;
        /// <summary>
        /// 右脚肌肉量,kg
        /// </summary>
        public decimal musclekgrightleg { get; set; } = 0;
        /// <summary>
        /// 左手肌肉量,kg
        /// </summary>
        public decimal musclekgleftarm { get; set; } = 0;
        /// <summary>
        /// 右手肌肉量,kg
        /// </summary>
        public decimal musclekgrightarm { get; set; } = 0;
        /// <summary>
        /// 躯干脂肪量,kg
        /// </summary>
        public decimal bodyfatkgtrunk { get; set; } = 0;
        /// <summary>
        /// 左脚脂肪量,kg
        /// </summary>
        public decimal bodyfatkgleftleg { get; set; } = 0;
        /// <summary>
        /// 右脚脂肪量,kg
        /// </summary>
        public decimal bodyfatkgrightleg { get; set; } = 0;
        /// <summary>
        /// 左手脂肪量,kg
        /// </summary>
        public decimal bodyfatkgleftarm { get; set; } = 0;
        /// <summary>
        /// 右手脂肪量,kg
        /// </summary>
        public decimal bodyfatkgrightarm { get; set; } = 0;
        /// <summary>
        /// 骨骼肌量,kg
        /// </summary>
        public decimal SkeletalMuscle { get; set; } = 0;

        /// <summary>
        /// 理想体重,kg
        /// </summary>
        public decimal idealweight { get; set; } = 0;
        /// <summary>
        /// 记录ID
        /// </summary>
        public Guid Id { get; set; }
    }

    /// <summary>
    /// 2/4电极算法返回结果定义
    /// </summary>
    public class BodyfatItem
    {
        /// <summary>
        /// bmi
        /// </summary>
        public string bmi;
        /// <summary>
        /// 骨量
        /// </summary>
        public string bm;
        /// <summary>
        /// 肌肉率
        /// </summary>
        public string rom;
        /// <summary>
        /// 水分
        /// </summary>
        public string moi;
        /// <summary>
        /// 脂肪率
        /// </summary>
        public string bfr;
        /// <summary>
        /// 皮下脂肪率
        /// </summary>
        public string sfr;
        /// <summary>
        /// 骨骼肌率
        /// </summary>
        public string rosm;
        /// <summary>
        /// 蛋白率
        /// </summary>
        public string pp;
        /// <summary>
        /// 内脏脂肪指数
        /// </summary>
        public string uvi;
        /// <summary>
        /// 基础代谢率
        /// </summary>
        public string bmr;
        /// <summary>
        /// 身体年龄
        /// </summary>
        public string physicAge;
        /// <summary>
        /// 体重
        /// </summary>
        public double weight;
        /// <summary>
        /// 身高
        /// </summary>
        public double height;
        /// <summary>
        /// 年龄
        /// </summary>
        public int age;
        /// <summary>
        /// 阻抗
        /// </summary>
        public int adc;
        /// <summary>
        /// 性别,0-女,1-男
        /// </summary>
        public int sex;
    }
}
