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_heartbeat")
public class EartagHeartbeatEntity 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 = "add_time")
    private Timestamp addTime;

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

    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 setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    public Timestamp getAddTime() {
        return addTime;
    }

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

    public Date getCreateDate() {
        return createDate;
    }

    @Override
    public String toString() {
        return "EartagHeartbeatEntity{" +
                "id=" + id + '\'' +
                "deviceCode=" + deviceCode + '\'' +
                "addTime=" + addTime + '\'' +
                "createDate=" + createDate + '\'' +
                '}';
    }
}
