package com.yihu.jw.entity.care.device;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IdEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * Created by Bing on 2021/8/23.
 */
@Entity
@Table(name="base_sleep_plan_detail")
public class BaseSleepPlanDetail extends IdEntity {
    private String  patient;
    private String  deviceSn;
    private String  day; //睡眠监控日期
    private Integer  upStatus; //起床状态 0起床 1未起床
    private Date  upTime; //起床时间
    private Integer  siestaStatus; //午睡状态 0未上床 1已上床
    private Date  siestaTimeBegin; //午睡开始时间
    private Date  siestaTimeEnd;  //午睡结束时间
    private String  siestaLong; //午睡时长 单位秒
    private Integer  inStatus; //睡觉状态 0未上床 1已上床
    private Date  inTimeBegin; //夜眠开始时间
    private Date  inTimeEnd; //夜眠结束时间
    private Date createTime;
    private Date  updateTime;
    private List<BaseSleepNightRecord> sleepNightRecordList;
    private String heartRate;
    private String breath;
    private Integer bedStatus; //0未在床 1在床

    public String getPatient() {
        return patient;
    }

    public void setPatient(String patient) {
        this.patient = patient;
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public Integer getUpStatus() {
        return upStatus;
    }

    public void setUpStatus(Integer upStatus) {
        this.upStatus = upStatus;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getUpTime() {
        return upTime;
    }

    public void setUpTime(Date upTime) {
        this.upTime = upTime;
    }

    public Integer getSiestaStatus() {
        return siestaStatus;
    }

    public void setSiestaStatus(Integer siestaStatus) {
        this.siestaStatus = siestaStatus;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getSiestaTimeBegin() {
        return siestaTimeBegin;
    }

    public void setSiestaTimeBegin(Date siestaTimeBegin) {
        this.siestaTimeBegin = siestaTimeBegin;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getSiestaTimeEnd() {
        return siestaTimeEnd;
    }

    public void setSiestaTimeEnd(Date siestaTimeEnd) {
        this.siestaTimeEnd = siestaTimeEnd;
    }

    public String getSiestaLong() {
        return siestaLong;
    }

    public void setSiestaLong(String siestaLong) {
        this.siestaLong = siestaLong;
    }

    public Integer getInStatus() {
        return inStatus;
    }

    public void setInStatus(Integer inStatus) {
        this.inStatus = inStatus;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getInTimeBegin() {
        return inTimeBegin;
    }

    public void setInTimeBegin(Date inTimeBegin) {
        this.inTimeBegin = inTimeBegin;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getInTimeEnd() {
        return inTimeEnd;
    }

    public void setInTimeEnd(Date inTimeEnd) {
        this.inTimeEnd = inTimeEnd;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Transient
    public List<BaseSleepNightRecord> getSleepNightRecordList() {
        return sleepNightRecordList;
    }

    public void setSleepNightRecordList(List<BaseSleepNightRecord> sleepNightRecordList) {
        this.sleepNightRecordList = sleepNightRecordList;
    }

    @Transient
    public String getHeartRate() {
        return heartRate;
    }

    public void setHeartRate(String heartRate) {
        this.heartRate = heartRate;
    }

    @Transient
    public String getBreath() {
        return breath;
    }

    public void setBreath(String breath) {
        this.breath = breath;
    }

    @Transient
    public Integer getBedStatus() {
        return bedStatus;
    }

    public void setBedStatus(Integer bedStatus) {
        this.bedStatus = bedStatus;
    }
}
