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_env")
public class EartagEnvEntity 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 = "temp1")
    private Integer temp1;

    @Column(name = "temp2")
    private Float temp2;

    @Column(name = "ask_time")
    private Timestamp askTime;

    @Column(name = "add_time")
    private Timestamp addTime;

    @Column(name = "create_date")
    private Date createDate;

    @Column(name = "ask_date")
    private Date askDate;

    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 setTemp1(Integer temp1) {
        this.temp1 = temp1;
    }

    public Integer getTemp1() {
        return temp1;
    }

    public void setTemp2(Float temp2) {
        this.temp2 = temp2;
    }

    public Float getTemp2() {
        return temp2;
    }

    public void setAskTime(Timestamp askTime) {
        this.askTime = askTime;
    }

    public Timestamp getAskTime() {
        return askTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    public Timestamp getAddTime() {
        return addTime;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setAskDate(Date askDate) {
        this.askDate = askDate;
    }

    public Date getAskDate() {
        return askDate;
    }

    @Override
    public String toString() {
        return "EartagEnvEntity{" +
                "id=" + id + '\'' +
                "deviceCode=" + deviceCode + '\'' +
                "temp1=" + temp1 + '\'' +
                "temp2=" + temp2 + '\'' +
                "askTime=" + askTime + '\'' +
                "addTime=" + addTime + '\'' +
                "createDate=" + createDate + '\'' +
                "askDate=" + askDate + '\'' +
                '}';
    }
}
