package com.fs.watch.domain;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 设备硬件信息
 * @TableName watch_device_info
 */
public class WatchDeviceInfo implements Serializable {
    /**
     * 设备id
     */
    private Long deviceId;

    /**
     * 公司id
     */
    private Long companyId;


    /**
     * 所属员工id
     */
    private Long companyUserId;

    /**
     * 所属医生id
     */
    private Long doctorId;

    /**
     * 设备编号
     */
    private String deviceNumber;

    /**
     * 电量
     */
    private Integer battery;

    /**
     * 信号
     */
    private Integer rssi;

    /**
     * 设备状态
     */
    private Integer status;


    /**
     * 生命状态
     */
    private Integer lifeStatus;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date updateTime;

    /**
     * 是否已删除
     */
    private Integer isDel;

    private static final long serialVersionUID = 1L;


    public Integer getLifeStatus() {
        return lifeStatus;
    }

    public void setLifeStatus(Integer lifeStatus) {
        this.lifeStatus = lifeStatus;
    }
    /**
     * 设备id
     */
    public Long getDeviceId() {
        return deviceId;
    }

    /**
     * 设备id
     */
    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }

    /**
     * 公司id
     */
    public Long getCompanyId() {
        return companyId;
    }

    /**
     * 公司id
     */
    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }


    public Long getCompanyUserId() {
        return companyUserId;
    }

    public void setCompanyUserId(Long companyUserId) {
        this.companyUserId = companyUserId;
    }

    public Long getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(Long doctorId) {
        this.doctorId = doctorId;
    }

    /**
     * 设备编号
     */
    public String getDeviceNumber() {
        return deviceNumber;
    }

    /**
     * 设备编号
     */
    public void setDeviceNumber(String deviceNumber) {
        this.deviceNumber = deviceNumber;
    }

    /**
     * 电量
     */
    public Integer getBattery() {
        return battery;
    }

    /**
     * 电量
     */
    public void setBattery(Integer battery) {
        this.battery = battery;
    }

    /**
     * 信号
     */
    public Integer getRssi() {
        return rssi;
    }

    /**
     * 信号
     */
    public void setRssi(Integer rssi) {
        this.rssi = rssi;
    }

    /**
     * 设备状态
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设备状态
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 创建者
     */
    public String getCreateBy() {
        return createBy;
    }

    /**
     * 创建者
     */
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新者
     */
    public String getUpdateBy() {
        return updateBy;
    }

    /**
     * 更新者
     */
    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 是否已删除
     */
    public Integer getIsDel() {
        return isDel;
    }

    /**
     * 是否已删除
     */
    public void setIsDel(Integer isDel) {
        this.isDel = isDel;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WatchDeviceInfo other = (WatchDeviceInfo) that;
        return (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
            && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
            && (this.getDeviceNumber() == null ? other.getDeviceNumber() == null : this.getDeviceNumber().equals(other.getDeviceNumber()))
            && (this.getBattery() == null ? other.getBattery() == null : this.getBattery().equals(other.getBattery()))
            && (this.getRssi() == null ? other.getRssi() == null : this.getRssi().equals(other.getRssi()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDel() == null ? other.getIsDel() == null : this.getIsDel().equals(other.getIsDel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
        result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
        result = prime * result + ((getDeviceNumber() == null) ? 0 : getDeviceNumber().hashCode());
        result = prime * result + ((getBattery() == null) ? 0 : getBattery().hashCode());
        result = prime * result + ((getRssi() == null) ? 0 : getRssi().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDel() == null) ? 0 : getIsDel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", deviceId=").append(deviceId);
        sb.append(", companyId=").append(companyId);
        sb.append(", deviceNumber=").append(deviceNumber);
        sb.append(", battery=").append(battery);
        sb.append(", rssi=").append(rssi);
        sb.append(", status=").append(status);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDel=").append(isDel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
