using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YBDevice.Entity
{
    /// <summary>
    /// 家庭成员实时数据,针对单设备类型
    /// </summary>
    [SugarTable("YB_FamilyRealData", TableDescription = "家庭成员实时数据", IsDisabledUpdateAll = false, IsDisabledDelete = true)]
    public class YB_FamilyRealData
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 家庭成员ID
        /// </summary>
        [SugarColumn(ColumnDescription = "家庭成员ID", IndexGroupNameList = new string[] { "index_familyid" })]
        public int FamilyId { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [SugarColumn(ColumnDescription = "用户ID")]
        public int UserId { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        [SugarColumn(ColumnDescription = "设备类型", IndexGroupNameList = new string[] { "index_devtype" })]
        public int DevType { get; set; }

        /// <summary>
        /// 累计测量次数
        /// </summary>
        [SugarColumn(ColumnDescription = "累计测量次数")]
        public int TotalCount { get; set; }

        /// <summary>
        /// 今日测量次数
        /// </summary>
        [SugarColumn(ColumnDescription = "今日测量次数")]
        public int TodayCount { get; set; }

        /// <summary>
        /// 初始体重
        /// </summary>
        [SugarColumn(ColumnDescription = "初始体重", ColumnDataType = "decimal(18,2)")]
        public decimal FirstWeight { get; set; }

        /// <summary>
        /// 第一次测量身高
        /// </summary>
        [SugarColumn(ColumnDescription = "第一次测量身高", ColumnDataType = "decimal(18,2)")]
        public decimal FirstHeight { get; set; }
        /// <summary>
        /// 第一次测量时间
        /// </summary>
        [SugarColumn(ColumnDescription = "第一次测量时间", IsNullable = true)]
        public DateTime? FirstResultTime { get; set; }

        /// <summary>
        /// 最近一次测量体重
        /// </summary>
        [SugarColumn(ColumnDescription = "最近一次测量体重", ColumnDataType = "decimal(18,2)")]
        public decimal LastWeight { get; set; }

        /// <summary>
        /// 最近一次身高
        /// </summary>
        [SugarColumn(ColumnDescription = "最近一次身高", ColumnDataType = "decimal(18,2)")]
        public decimal LastHeight { get; set; }

        /// <summary>
        /// 最近一次头围
        /// </summary>
        [SugarColumn(ColumnDescription = "最近一次头围", ColumnDataType = "decimal(18,2)", IsNullable = true)]
        public decimal LastHead { get; set; }

        /// <summary>
        /// 最近一次测量时间
        /// </summary>
        [SugarColumn(ColumnDescription = "最近一次测量时间", IsNullable = true)]
        public DateTime? LastResultTime { get; set; }

        /// <summary>
        /// 最近一次身高测量时间
        /// </summary>
        [SugarColumn(ColumnDescription = "最近一次身高测量时间", IsNullable = true)]
        public System.DateTime? LastResultHeightTime { get; set; }

        /// <summary>
        /// 最近一次测量记录ID
        /// </summary>
        [SugarColumn(ColumnDescription = "最近一次测量记录ID", IsNullable = true)]
        public Guid? LastResultId { get; set; }

        /// <summary>
        /// 本月最高身高值,厘米
        /// </summary>
        [SugarColumn(ColumnDescription = "本月最高身高值,厘米", IsNullable = true, ColumnDataType = "decimal(18,2)")]
        public decimal MonthHeight { get; set; }

        /// <summary>
        /// 本月最新体重值,公斤
        /// </summary>
        [SugarColumn(ColumnDescription = "本月最新体重值,公斤", IsNullable = true, ColumnDataType = "decimal(18,2)")]
        public decimal MonthWeight { get; set; }

        /// <summary>
        /// 本月最新头围,CM
        /// </summary>
        [SugarColumn(ColumnDescription = "本月最新头围,CM", IsNullable = true, ColumnDataType = "decimal(18,2)")]
        public decimal MonthHead { get; set; }

        /// <summary>
        /// 较上次的体重变化,上一次减去本次
        /// </summary>
        [SugarColumn(ColumnDescription = "较上次的体重变化,上一次减去本次", ColumnDataType = "decimal(18,2)")]
        public decimal LastTimeWeight { get; set; }

        /// <summary>
        /// 较上次的身高变化,上次减去本次
        /// </summary>
        [SugarColumn(ColumnDescription = "较上次的身高变化,上次减去本次", ColumnDataType = "decimal(18,2)")]
        public decimal LastTimeHeight { get; set; }

        /// <summary>
        /// 半年前的身高
        /// </summary>
        [SugarColumn(ColumnDescription = "半年前的身高", ColumnDataType = "decimal(10,2)", IsNullable = true)]
        public System.Decimal HalfYearHeight { get; set; }

        /// <summary>
        /// 半年前的身高记录时间
        /// </summary>
        [SugarColumn(ColumnDescription = "半年前的身高记录时间", IsNullable = true)]
        public DateTime? HalfYearHeightTime { get; set; }

        /// <summary>
        /// 一年前的身高
        /// </summary>
        [SugarColumn(ColumnDescription = "一年前的身高", ColumnDataType = "decimal(10,2)", IsNullable = true)]
        public System.Decimal YearHeight { get; set; }

        /// <summary>
        /// 一年前的身高记录时间
        /// </summary>
        [SugarColumn(ColumnDescription = "一年前的身高记录时间", IsNullable = true)]
        public DateTime? YearHeightTime { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnDescription = "创建时间")]
        public DateTime CreateTime { get; set; }
    }
}
