package com.fs.watch.domain;

import com.fs.common.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.util.UUID;

/**
 * 设备心率数据
 * @TableName watch_heart_rate_data
 */
@Data
public class WatchHeartRateData implements Serializable {
    //    @Excel(name = "记录编号", cellType = Excel.ColumnType.STRING, prompt = "记录编号")
    private UUID id;

    //    @Excel(name = "设备编号", cellType = Excel.ColumnType.STRING, prompt = "设备编号")
    private String deviceId;

    @Excel(name = "平均心率", prompt = "平均心率")
    private Integer avgBpm;

    @Excel(name = "最大心率")
    private Integer maxBpm;

    @Excel(name = "最小心率")
    private Integer minBpm;

    //状态 0:正常 1:过低 2:过高
    private Integer status;

    @Excel(name = "记录时间", cellType = Excel.ColumnType.STRING, prompt = "记录时间")
    private String createTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WatchHeartRateData other = (WatchHeartRateData) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
                && (this.getAvgBpm() == null ? other.getAvgBpm() == null : this.getAvgBpm().equals(other.getAvgBpm()))
                && (this.getMaxBpm() == null ? other.getMaxBpm() == null : this.getMaxBpm().equals(other.getMaxBpm()))
                && (this.getMinBpm() == null ? other.getMinBpm() == null : this.getMinBpm().equals(other.getMinBpm()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
        result = prime * result + ((getAvgBpm() == null) ? 0 : getAvgBpm().hashCode());
        result = prime * result + ((getMaxBpm() == null) ? 0 : getMaxBpm().hashCode());
        result = prime * result + ((getMinBpm() == null) ? 0 : getMinBpm().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", deviceId=").append(deviceId);
        sb.append(", avgBpm=").append(avgBpm);
        sb.append(", maxBpm=").append(maxBpm);
        sb.append(", minBpm=").append(minBpm);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
//    /**
//     * 主键id
//     */
//    private String id;
//
//    /**
//     * 设备编号
//     */
//    private String deviceId;
//
//    /**
//     * 平均心率
//     */
//    private Integer avgBpm;
//
//    /**
//     * 最大心率
//     */
//    private Integer maxBpm;
//
//    /**
//     * 最小心率
//     */
//    private Integer minBpm;
//
//    /**
//     * 心率状态 0:正常 1:过低 2:过高
//     */
//    private Integer status;
//
//    /**
//     * 创建时间
//     */
//    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
//    private Date createTime;
//
//    private static final long serialVersionUID = 1L;
//
//    /**
//     * 主键id
//     */
//    public String getId() {
//        return id;
//    }
//
//    /**
//     * 主键id
//     */
//    public void setId(String id) {
//        this.id = id;
//    }
//
//    /**
//     * 设备编号
//     */
//    public String getDeviceId() {
//        return deviceId;
//    }
//
//    /**
//     * 设备编号
//     */
//    public void setDeviceId(String deviceId) {
//        this.deviceId = deviceId;
//    }
//
//    /**
//     * 平均心率
//     */
//    public Integer getAvgBpm() {
//        return avgBpm;
//    }
//
//    /**
//     * 平均心率
//     */
//    public void setAvgBpm(Integer avgBpm) {
//        this.avgBpm = avgBpm;
//    }
//
//    /**
//     * 最大心率
//     */
//    public Integer getMaxBpm() {
//        return maxBpm;
//    }
//
//    /**
//     * 最大心率
//     */
//    public void setMaxBpm(Integer maxBpm) {
//        this.maxBpm = maxBpm;
//    }
//
//    /**
//     * 最小心率
//     */
//    public Integer getMinBpm() {
//        return minBpm;
//    }
//
//    /**
//     * 最小心率
//     */
//    public void setMinBpm(Integer minBpm) {
//        this.minBpm = minBpm;
//    }
//
//    /**
//     * 心率状态 0:正常 1:过低 2:过高
//     */
//    public Integer getStatus() {
//        return status;
//    }
//
//    /**
//     * 心率状态 0:正常 1:过低 2:过高
//     */
//    public void setStatus(Integer status) {
//        this.status = status;
//    }
//
//    /**
//     * 创建时间
//     */
//    public Date getCreateTime() {
//        return createTime;
//    }
//
//    /**
//     * 创建时间
//     */
//    public void setCreateTime(Date createTime) {
//        this.createTime = createTime;
//    }
//
//    @Override
//    public boolean equals(Object that) {
//        if (this == that) {
//            return true;
//        }
//        if (that == null) {
//            return false;
//        }
//        if (getClass() != that.getClass()) {
//            return false;
//        }
//        WatchHeartRateData other = (WatchHeartRateData) that;
//        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
//            && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
//            && (this.getAvgBpm() == null ? other.getAvgBpm() == null : this.getAvgBpm().equals(other.getAvgBpm()))
//            && (this.getMaxBpm() == null ? other.getMaxBpm() == null : this.getMaxBpm().equals(other.getMaxBpm()))
//            && (this.getMinBpm() == null ? other.getMinBpm() == null : this.getMinBpm().equals(other.getMinBpm()))
//            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
//            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
//    }
//
//    @Override
//    public int hashCode() {
//        final int prime = 31;
//        int result = 1;
//        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
//        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
//        result = prime * result + ((getAvgBpm() == null) ? 0 : getAvgBpm().hashCode());
//        result = prime * result + ((getMaxBpm() == null) ? 0 : getMaxBpm().hashCode());
//        result = prime * result + ((getMinBpm() == null) ? 0 : getMinBpm().hashCode());
//        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
//        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
//        return result;
//    }
//
//    @Override
//    public String toString() {
//        StringBuilder sb = new StringBuilder();
//        sb.append(getClass().getSimpleName());
//        sb.append(" [");
//        sb.append("Hash = ").append(hashCode());
//        sb.append(", id=").append(id);
//        sb.append(", deviceId=").append(deviceId);
//        sb.append(", avgBpm=").append(avgBpm);
//        sb.append(", maxBpm=").append(maxBpm);
//        sb.append(", minBpm=").append(minBpm);
//        sb.append(", status=").append(status);
//        sb.append(", createTime=").append(createTime);
//        sb.append(", serialVersionUID=").append(serialVersionUID);
//        sb.append("]");
//        return sb.toString();
//    }
}
