package com.xty.network.model

import java.io.Serializable

data class MainBean(
    val activity: String,
    val deviceType: String,//手表类型
    val adorn: Adorn,
    val clock: Int,
    val dbpData: DbpData,//血压
    val grade: String,
    val healthScore: Int,
    val heartData: HeartData,//心电
    val hrData: HrData,//心率
    val respiratoryData: RespiratoryData,//呼吸率
    val sleepData: SleepData,//睡眠
    val soData: SoData,//血氧
    val tempData: TempData,//体温
    val user: User,
    val power: String,
    val watchType: Int,//0:蓝牙U32 1:4G A3
    val weather: Weather,
    val bmi:String, //BMI 值
    val warningCount :Int, //预警次数
    val healthCount :Int, //监测次数
    val chinaDay:String, //农历日期
    val nowDay:String,//当前日期
    val deviceTotal: DeviceTotal,//物联网数据
    val demonstrate: Int,//0:普通模式 1: 演示模式
    val stepData: StepData,//步数
    val bloodSugarData: DloodSugarData,//血糖
    val uricAcidData: UricAcidData,//尿酸
    val caloriesData: String,//卡路里
    val bloodFatData: BloodFatData,//血脂
    val bmiInfo: BMIInfoBean? //bmi信息

) {
    //血脂
    data class BloodFatData(
        val expireTime: String,
        val time: String,
        val message: String,
        val value: String,
        val status: Int,
        val count:String,
    )

    //尿酸
    data class UricAcidData(
        val time: String,
        val message: String,
        val value: String,
        val status: Int,
        val expireTime: String,
        val count:String,
    )

    //血糖数据
    data class DloodSugarData(
        val time: String,
        val bloodsugar: String,
        val model: Int,//0 未开通 1：建模中 2：建模完成
        val avg: Float,
        val max: Float,
        val min: Float,
        val errorMsg: String,
        val expireTime: String,
        val count:String,
    )

    //步数
    data class StepData(
        val step: Int,
        val stepTime: String,
    )

    data class DeviceTotal(
        val sphygmomanometer: Int,//血压计数据
        val bloodGlucose: Int,//血糖仪数据
        val bodyFatScale: Int //体脂秤数据
    )

    data class Weather(
        val city: String,//城市名
        val weatherInfo: String,//天气信息
        val weatherNo: String//天气变码
    )

    data class Adorn(
        val activeWear: Int,//活跃佩戴天数
        val dormancy: Int,//休眠天数
        val health: Int,
        val wearCount: Int//总佩戴天数
    )

    //血压
    data class DbpData(
        val DDbp: Int,
        val DbpMessage: String,
        val DbpTime: String,
        val GDbp: Int,
        val count:String,
    )

    //心电
    data class HeartData(
        val hrvNorm: String,
        val hrData: String,
        val heartTime: String,
        val heartTimeV2: String,
        val count:String,
    )

    //心率
    data class HrData(
        val hr: Int,
        val hrMessage: String,
        val hrTime: String,
        val count:String,
    )

    //呼吸率
    data class RespiratoryData(
        val respiratory: Int,
        val respiratoryMessage: String,
        val respiratoryTime: String,
        val count:String,
    )

    //睡眠
    data class SleepData(
        val sleep: Int,
        val sleepMessage: String,
        val sleepTime: Int,
        val count:String,
    )

    //血氧
    data class SoData(
        val so: Int,
        val soMessage: String,
        val soTime: String,
        val count:String,
    )

    //体温
    data class TempData(
        val tempFloat: Int,
        val tempInt: Int,
        val tempMessage: String,
        val tempTime: String,
        val count:String,
    )

    data class User(
        val id: Long,
        val age: String,
        val height: String? = null,
        var image: String,
        val medicalHistory: Any,
        val name: String,
        val phone: String,
        val sex: Int,
        val star: String,
        val deviceType: String,
        val weight: String? = null,
        val bodyFatMac: String,
        val isPerfect:Int = 1 //0，未完善，1，已完善
    ) : Serializable

    data class BMIInfoBean(
        val levelName:String,
        val bmi:String
    )
}
