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

namespace YBDevice.Entity
{
    /// <summary>
    /// 儿童信息
    /// </summary>
    public class ChildInfoModel
    {
        /// <summary>
        /// 身高值,CM
        /// </summary>
        public decimal Height { get; set; } = 130.5m;
        /// <summary>
        /// 体重,公斤
        /// </summary>
        public decimal Weight { get; set; } = 25.7m;
        /// <summary>
        /// 头围,厘米
        /// </summary>
        public decimal Head { get; set; } = 0;
        /// <summary>
        /// 成年身高,CM
        /// </summary>
        public decimal GeneticHeight { get; set; }
        /// <summary>
        /// 测量时间
        /// </summary>
        public string Time { get; set; }
        /// <summary>
        /// 标准遗传身高,CM
        /// </summary>
        public decimal PredictHeight { get; set; }
        /// <summary>
        /// 遗传身高是否大于实测身高,true-是,false-否
        /// </summary>
        public bool IsHeight { get; set; }
        /// <summary>
        /// 警告类型,1-红色警示,2-橙色警示,3-黄色警示,4-绿色警示,5-蓝色嘉奖
        /// </summary>
        public int AlertType { get; set; }
        /// <summary>
        /// 父亲身高,CM
        /// </summary>
        public decimal DadHeight { get; set; } = 180;
        /// <summary>
        /// 母亲身高
        /// </summary>
        public decimal MomHeight { get; set; } = 165;
        /// <summary>
        /// 半年的身高增长值,CM
        /// </summary>
        public decimal HalfYearHeight { get; set; } = 3.5m;
        /// <summary>
        /// 一年的身高增长值
        /// </summary>
        public decimal YearHeight { get; set; } = 7;
        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; } = "核桃(演示)";
        /// <summary>
        /// 头像
        /// </summary>
        public string HeadImg { get; set; }
        /// <summary>
        /// 年龄
        /// </summary>
        public string Age { get; set; }
        /// <summary>
        /// 性别,1-男,2-女
        /// </summary>
        public GenderType Sex { get; set; } = GenderType.FeMale;
        /// <summary>
        /// 生日
        /// </summary>
        public string Birthday { get; set; }
        /// <summary>
        /// familyid
        /// </summary>
        public int Id { get; set; } = 0;
        /// <summary>
        /// 最新的身高测量时间
        /// </summary>
        public string LastHeightTime { get; set; }
        /// <summary>
        /// BMI值
        /// </summary>
        public decimal BMI { get; set; }
        /// <summary>
        /// BMI等级
        /// </summary>
        public string BMILevel { get; set; }
        /// <summary>
        /// 身高等级
        /// </summary>
        public string HeightLevel { get; set; }
        /// <summary>
        /// 体重等级
        /// </summary>
        public string WeightLevel { get; set; }
        /// <summary>
        /// 头围等级
        /// </summary>
        public string HeadLevel { get; set; }
        /// <summary>
        /// BMI等级颜色
        /// </summary>
        public string BMILevelColor { get; set; }
        /// <summary>
        /// 身高等级颜色
        /// </summary>
        public string HeightLevelColor { get; set; }
        /// <summary>
        /// 体重等级颜色
        /// </summary>
        public string WeightLevelColor { get; set; }
        /// <summary>
        /// 头围等级颜色
        /// </summary>
        public string HeadLevelColor { get; set; }
        /// <summary>
        /// BMI分级列表
        /// </summary>
        public List<MeasureInfoItemValue> BMILevelList { get; set; }

        /// <summary>
        /// 身高分级列表
        /// </summary>
        public List<MeasureInfoItemValue> HeightLevelList { get; set; }

        /// <summary>
        /// 体重分级列表
        /// </summary>
        public List<MeasureInfoItemValue> WeightLevelList { get; set; }
        /// <summary>
        /// 头围分级列表
        /// </summary>
        public List<MeasureInfoItemValue> HeadLevelList { get; set; }
        /// <summary>
        /// 标准体重,公斤
        /// </summary>
        public decimal StandWeight { get; set; }
        /// <summary>
        /// 成员类型
        /// </summary>
        public FamilyType Type { get; set; }
        /// <summary>
        /// 最新的记录ID
        /// </summary>
        public Guid? ResultId { get; set; }
        /// <summary>
        /// 儿童处方相关信息
        /// </summary>
        public ChildPrescriptionS2CDto cplist { get; set; }

        /// <summary>
        /// 文献引用列表
        /// </summary>
        public List<string> ReferList { get; set; }


        /// <summary>
        /// 数据参考列表
        /// </summary>
        public List<string> DataReferList { get; set; }
    }
    /// <summary>
    /// 儿童处方相关信息
    /// </summary>
    public class ChildPrescriptionS2CDto
    {
        /// <summary>
        /// 营养列表
        /// </summary>
        public List<string> NutritionList { get; set; }
        /// <summary>
        /// 运动列表
        /// </summary>
        public List<string> SportList { get; set; }
        /// <summary>
        /// 睡眠列表
        /// </summary>
        public List<string> SleepList { get; set; }
        /// <summary>
        /// 情绪列表
        /// </summary>
        public List<string> MoodList { get; set; }
    }
    /// <summary>
    /// 成长曲线
    /// </summary>
    public class ChildGrowthModel
    {
        /// <summary>
        /// 测量时间
        /// </summary>
        public string Time { get; set; }
        /// <summary>
        /// 身高
        /// </summary>
        public decimal Height { get; set; }
        /// <summary>
        /// 体重
        /// </summary>
        public decimal Weight { get; set; }
        /// <summary>
        /// 头围
        /// </summary>
        public decimal Header { get; set; }
    }
    /// <summary>
    /// 历史曲线查询参数
    /// </summary>
    public class ChildGrowthQueryModel
    {
        /// <summary>
        /// 家庭成员ID
        /// </summary>
        public int familyid { get; set; } = 0;
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 页码
        /// </summary>
        public int page { get; set; } = 1;
        /// <summary>
        /// 每页显示的数量
        /// </summary>
        public int pagesize { get; set; }
        /// <summary>
        /// 设备类型
        /// </summary>
        public  int DevType { get; set; }
    }

    /// <summary>
    /// 儿童增量信息
    /// </summary>
    public class ChildYearHeightModel
    {
        /// <summary>
        /// 实测身高
        /// </summary>
        public decimal Height { get; set; }
        /// <summary>
        /// 身高等级,1-正常,2-偏矮,3-偏高,4-矮,5高,6-异常
        /// </summary>
        public ChildHeightLevel HeightLevel { get; set; }
        /// <summary>
        /// 半年增高
        /// </summary>
        public decimal HalfYearHeight { get; set; }
        /// <summary>
        /// 半年增高等级,1-正常,2-偏低
        /// </summary>
        public int HalfYearHeightLevel { get; set; }
        /// <summary>
        /// 半年增量的标准身高,大于则正常,小于则偏低
        /// </summary>
        public decimal HalfYearStandHeight { get; set; }
        /// <summary>
        /// 近一年增高
        /// </summary>
        public decimal YearHeight { get; set; }
        /// <summary>
        /// 一年增高等级,1-正常,2-偏低
        /// </summary>
        public int YearHeightLevel { get; set; }

        /// <summary>
        /// 一年增量的标准身高,大于则正常,小于则偏低
        /// </summary>
        public decimal YearStandHeight { get; set; }
        /// <summary>
        /// 下下等标准值
        /// </summary>
        public decimal f3sd { get; set; }
        /// <summary>
        /// 下等标准值
        /// </summary>
        public decimal f2sd { get; set; }
        /// <summary>
        /// 中下标准值
        /// </summary>
        public decimal f1sd { get; set; }
        /// <summary>
        /// 中等标准值
        /// </summary>
        public decimal median { get; set; }
        /// <summary>
        /// 中上标准值
        /// </summary>
        public decimal z1sd { get; set; }
        /// <summary>
        /// 上等标准值
        /// </summary>
        public decimal z2sd { get; set; }
        /// <summary>
        /// 上上等标准值
        /// </summary>
        public decimal z3sd { get; set; }

        /// <summary>
        /// 等级列表
        /// </summary>
        public List<MeasureInfoItemValue> list { get; set; }
    }
    /// <summary>
    /// 身高/体重报告
    /// </summary>
    public class ChildWHModel
    {
        /// <summary>
        /// 时间,年月
        /// </summary>
        public string Time { get; set; }
        /// <summary>
        /// 实测值
        /// </summary>
        public decimal Value { get; set; }
        /// <summary>
        /// 标准值
        /// </summary>
        public decimal StandValue { get; set; }
    }
    /// <summary>
    /// 身高预测
    /// </summary>
    public class ChildPredictHeightModel
    {
        /// <summary>
        /// 孩子身高
        /// </summary>
        public decimal Height { get; set; }
        /// <summary>
        /// 孩子体重
        /// </summary>
        public decimal Weight { get; set; }
        /// <summary>
        /// 爸爸身高
        /// </summary>
        public decimal DadHeight { get; set; }
        /// <summary>
        /// 妈妈身高
        /// </summary>
        public decimal MomHeight { get; set; }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime Birthday { get; set; }
        /// <summary>
        /// 性别,1-男,2-女
        /// </summary>
        public GenderType sex { get; set; }
        /// <summary>
        /// 家庭成员ID,如果没有传0即可
        /// </summary>
        public int familyid { get; set; } = 0;
        /// <summary>
        /// 小程序appid
        /// </summary>
        public string AppId { get; set; }
    }
    /// <summary>
    /// 身高预测返回值
    /// </summary>
    public class ChildPredictHeightReturnModel
    {
        /// <summary>
        /// 遗传身高
        /// </summary>
        public decimal GeneticHeight { get; set; }
        /// <summary>
        /// 成年身高
        /// </summary>
        public decimal AdultHeight { get; set; }
        /// <summary>
        /// 正负误差值
        /// </summary>
        public decimal ErrorValue { get; set; }
    }

    /// <summary>
    /// 演示成员
    /// </summary>
    public class YSFamily
    {
        /// <summary>
        /// ID
        /// </summary>
        public int Id { get; set; } = 0;

        /// <summary>
        /// 年龄,7岁
        /// </summary>
        public int Age { get; set; } = 7;
        /// <summary>
        /// 年龄,岁月格式
        /// </summary>
        public string mAge
        {
            get
            {
                return DateTime.Now.AddYears(-7).Date.TomAge();
            }
        }
        /// <summary>
        /// 性别,1-男,2-女
        /// </summary>
        public int Sex { get; set; } = 1;
        /// <summary>
        /// 体重,25KG
        /// </summary>
        public decimal Weight { get; set; } = 25;
        /// <summary>
        /// 身高,130CM
        /// </summary>
        public decimal Height { get; set; } = 130;
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime Birthday
        {
            get
            {
                return DateTime.Now.AddYears(-7).Date;
            }
        }
        /// <summary>
        /// 月龄
        /// </summary>
        public int Month
        {
            get
            {
                return DateTime.Now.AddYears(-7).ToMonth();
            }
        }
        /// <summary>
        /// 半年增高的身高,CM
        /// </summary>
        public decimal HalfYearHeight { get; set; } = 3.5m;
        /// <summary>
        /// 一年增高的身高,CM
        /// </summary>
        public decimal YearHeight { get; set; } = 6;
        /// <summary>
        /// 父亲身高
        /// </summary>
        public decimal DadHeight { get; set; } = 180;
        /// <summary>
        /// 母亲身高
        /// </summary>
        public decimal MomHeight { get; set; } = 165;
        /// <summary>
        /// 测量时间
        /// </summary>
        public DateTime Time
        {
            get
            {
                return DateTime.Now.Date;
            }
        }
        /// <summary>
        /// 演示名称
        /// </summary>
        public string Name { get; set; } = "核桃(演示)";
        /// <summary>
        /// 头像
        /// </summary>
        public string HeadImg
        {
            get
            {
                return $"{Configs.GetString("APICDNURL")}/img/child_male.png";
            }
        }
        /// <summary>
        /// 演示的阻抗值
        /// </summary>
        public int imp { get; set; } = 650;
        /// <summary>
        /// 成人身高
        /// </summary>
        public decimal ADHeight { get; set; } = 175;
        /// <summary>
        /// 成人体重
        /// </summary>
        public decimal ADWeight { get; set; } = 68;
        /// <summary>
        /// 成人年龄
        /// </summary>
        public int ADAge { get; set; } = 18;
    }
}
