using Newtonsoft.Json;
using YBDevice.Entity;

namespace YBDevice.Body.BodyFatHelper
{
    /// <summary>
    /// 八电极测量项
    /// </summary>
    public class Body120MeausreS2CDto : UserBodyMeasureS2CDto
    {
        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public GenderType Sex { get; set; }
    }

    /// <summary>
    /// 八电极测量项
    /// </summary>
    public class UserBodyMeasureS2CDto : UserMeasureDto
    {
        /// <summary>
        /// 历史记录值
        /// </summary>
        public List<MeasureInfoItem> list { get; set; }
    }

    /// <summary>
    /// 八电极测量项
    /// </summary>
    public class UserMeasureDto : MeasureLevelDto
    {
        /// <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>
        /// 骨重,kg
        /// </summary>
        public decimal bone { get; set; } = 0;

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

        /// <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 fat_w { get; set; } = 0;

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

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

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

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

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

        /// <summary>
        /// BMI,kg/m2
        /// </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 muscleval { get; set; } = 0;

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

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

        /// <summary>
        /// 体重,kg
        /// </summary>
        public decimal weight { get; set; } = 0;

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

        /// <summary>
        /// 身高,CM
        /// </summary>
        public decimal height { get; set; } = 0;

        /// <summary>
        /// 记录ID
        /// </summary>
        public virtual Guid Id { get; set; }
    }

    /// <summary>
    /// 返回给第三方的八电极测量项
    /// </summary>
    public class OpenUserMeasureDto : UserMeasureDto
    {
        /// <summary>
        /// 记录ID
        /// </summary>
        [JsonIgnore]
        public override Guid Id { get; set; }
    }

    /// <summary>
    /// 测量项等级
    /// </summary>
    public class MeasureLevelDto
    {
        /// <summary>
        /// 骨骼肌量标准
        /// </summary>
        public string SkeletalMuscleLevel { get; set; } = "异常";

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

        /// <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 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 string age { get; set; }

        /// <summary>
        /// 身高,厘米
        /// </summary>
        public string heightCm { get; set; }

        /// <summary>
        /// 人群类型,0-普通,1-运动员
        /// </summary>
        public string peopleType { get; set; }

        /// <summary>
        /// 性别,0-女,1-男
        /// </summary>
        public string sex { get; set; }

        /// <summary>
        /// 重量,公斤
        /// </summary>
        public string weightKg { get; set; }

        /// <summary>
        /// 左侧全⾝阻抗阻抗(悠健编码后值)
        /// </summary>
        public string zLeftBodyEnCode { get; set; }

        /// <summary>
        /// 左⼿阻抗阻抗(悠健编码后值
        /// </summary>
        public string zLeftArmEnCode { get; set; }

        /// <summary>
        /// 左脚阻抗阻抗(悠健编码后值)
        /// </summary>
        public string zLeftLegEnCode { get; set; }

        /// <summary>
        /// 右⼿阻抗阻抗(悠健编码后值
        /// </summary>
        public string zRightArmEnCode { get; set; }

        /// <summary>
        /// 右脚阻抗阻抗(悠健编码后值
        /// </summary>
        public string zRightLegEnCode { get; set; }
    }
}