package com.huimv.eartag.dao.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Date;
import java.sql.Timestamp;

@Entity
@Table(name = "eartag_device_online")
public class EartagDeviceOnlineEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Integer id;

    @Column(name = "device_code")
    private String deviceCode;

    @Column(name = "alias")
    private String alias;

    @Column(name = "heartbeat_total")
    private Integer heartbeatTotal;

    @Column(name = "envtemp_total")
    private Integer envtempTotal;

    @Column(name = "eartag_total")
    private Integer eartagTotal;

    @Column(name = "first_time")
    private Timestamp firstTime;

    @Column(name = "last_time")
    private Timestamp lastTime;

    @Column(name = "last_envtemp")
    private String lastEnvtemp;

    @Column(name = "last_eartag")
    private String lastEartag;

    @Column(name = "add_date")
    private Date addDate;

    @Column(name = "farm_id")
    private String farmId;

    @Column(name = "heartbeat_first_time")
    private Timestamp heartbeatFirstTime;

    @Column(name = "heartbeat_last_time")
    private Timestamp heartbeatLastTime;

    @Column(name = "envtemp_first_time")
    private Timestamp envtempFirstTime;

    @Column(name = "envtemp_last_time")
    private Timestamp envtempLastTime;

    @Column(name = "eartag_first_time")
    private Timestamp eartagFirstTime;

    @Column(name = "eartag_last_time")
    private Timestamp eartagLastTime;

    @Column(name = "live_status")
    private Integer liveStatus;

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getAlias() {
        return alias;
    }

    public void setHeartbeatTotal(Integer heartbeatTotal) {
        this.heartbeatTotal = heartbeatTotal;
    }

    public Integer getHeartbeatTotal() {
        return heartbeatTotal;
    }

    public void setEnvtempTotal(Integer envtempTotal) {
        this.envtempTotal = envtempTotal;
    }

    public Integer getEnvtempTotal() {
        return envtempTotal;
    }

    public void setEartagTotal(Integer eartagTotal) {
        this.eartagTotal = eartagTotal;
    }

    public Integer getEartagTotal() {
        return eartagTotal;
    }

    public void setFirstTime(Timestamp firstTime) {
        this.firstTime = firstTime;
    }

    public Timestamp getFirstTime() {
        return firstTime;
    }

    public void setLastTime(Timestamp lastTime) {
        this.lastTime = lastTime;
    }

    public Timestamp getLastTime() {
        return lastTime;
    }

    public void setLastEnvtemp(String lastEnvtemp) {
        this.lastEnvtemp = lastEnvtemp;
    }

    public String getLastEnvtemp() {
        return lastEnvtemp;
    }

    public void setLastEartag(String lastEartag) {
        this.lastEartag = lastEartag;
    }

    public String getLastEartag() {
        return lastEartag;
    }

    public void setAddDate(Date addDate) {
        this.addDate = addDate;
    }

    public Date getAddDate() {
        return addDate;
    }

    public void setFarmId(String farmId) {
        this.farmId = farmId;
    }

    public String getFarmId() {
        return farmId;
    }

    public void setHeartbeatFirstTime(Timestamp heartbeatFirstTime) {
        this.heartbeatFirstTime = heartbeatFirstTime;
    }

    public Timestamp getHeartbeatFirstTime() {
        return heartbeatFirstTime;
    }

    public void setHeartbeatLastTime(Timestamp heartbeatLastTime) {
        this.heartbeatLastTime = heartbeatLastTime;
    }

    public Timestamp getHeartbeatLastTime() {
        return heartbeatLastTime;
    }

    public void setEnvtempFirstTime(Timestamp envtempFirstTime) {
        this.envtempFirstTime = envtempFirstTime;
    }

    public Timestamp getEnvtempFirstTime() {
        return envtempFirstTime;
    }

    public void setEnvtempLastTime(Timestamp envtempLastTime) {
        this.envtempLastTime = envtempLastTime;
    }

    public Timestamp getEnvtempLastTime() {
        return envtempLastTime;
    }

    public void setEartagFirstTime(Timestamp eartagFirstTime) {
        this.eartagFirstTime = eartagFirstTime;
    }

    public Timestamp getEartagFirstTime() {
        return eartagFirstTime;
    }

    public void setEartagLastTime(Timestamp eartagLastTime) {
        this.eartagLastTime = eartagLastTime;
    }

    public Timestamp getEartagLastTime() {
        return eartagLastTime;
    }

    public void setLiveStatus(Integer liveStatus) {
        this.liveStatus = liveStatus;
    }

    public Integer getLiveStatus() {
        return liveStatus;
    }

    @Override
    public String toString() {
        return "EartagDeviceOnlineEntity{" +
                "id=" + id + '\'' +
                "deviceCode=" + deviceCode + '\'' +
                "alias=" + alias + '\'' +
                "heartbeatTotal=" + heartbeatTotal + '\'' +
                "envtempTotal=" + envtempTotal + '\'' +
                "eartagTotal=" + eartagTotal + '\'' +
                "firstTime=" + firstTime + '\'' +
                "lastTime=" + lastTime + '\'' +
                "lastEnvtemp=" + lastEnvtemp + '\'' +
                "lastEartag=" + lastEartag + '\'' +
                "addDate=" + addDate + '\'' +
                "farmId=" + farmId + '\'' +
                "heartbeatFirstTime=" + heartbeatFirstTime + '\'' +
                "heartbeatLastTime=" + heartbeatLastTime + '\'' +
                "envtempFirstTime=" + envtempFirstTime + '\'' +
                "envtempLastTime=" + envtempLastTime + '\'' +
                "eartagFirstTime=" + eartagFirstTime + '\'' +
                "eartagLastTime=" + eartagLastTime + '\'' +
                "liveStatus=" + liveStatus + '\'' +
                '}';
    }
}
