package com.huimv.produce.warning.dao.entity;

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

@Entity
@Table(name = "farm_device")
public class FarmDeviceEntity implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @Column(name = "device_name")
    private String deviceName;

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

    @Column(name = "device_type")
    private String deviceType;

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

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

    @Column(name = "main_params")
    private String mainParams;

    @Column(name = "state")
    private Integer state;

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

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

    @Column(name = "up_time")
    private Timestamp upTime;

    @Column(name = "down_time")
    private Timestamp downTime;

    @Column(name = "lockin_state")
    private Integer lockinState;

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

    @Column(name = "data_id")
    private Integer dataId;

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

    public Integer getId() {
        return id;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceName() {
        return deviceName;
    }

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

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public String getFactory() {
        return factory;
    }

    public void setWorker(String worker) {
        this.worker = worker;
    }

    public String getWorker() {
        return worker;
    }

    public void setMainParams(String mainParams) {
        this.mainParams = mainParams;
    }

    public String getMainParams() {
        return mainParams;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getState() {
        return state;
    }

    public void setRecord(String record) {
        this.record = record;
    }

    public String getRecord() {
        return record;
    }

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

    public Timestamp getLastTime() {
        return lastTime;
    }

    public void setUpTime(Timestamp upTime) {
        this.upTime = upTime;
    }

    public Timestamp getUpTime() {
        return upTime;
    }

    public void setDownTime(Timestamp downTime) {
        this.downTime = downTime;
    }

    public Timestamp getDownTime() {
        return downTime;
    }

    public void setLockinState(Integer lockinState) {
        this.lockinState = lockinState;
    }

    public Integer getLockinState() {
        return lockinState;
    }

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

    public Integer getFarmId() {
        return farmId;
    }

    public void setDataId(Integer dataId) {
        this.dataId = dataId;
    }

    public Integer getDataId() {
        return dataId;
    }

    @Override
    public String toString() {
        return "FarmDeviceEntity{" +
                "id=" + id + '\'' +
                "deviceName=" + deviceName + '\'' +
                "deviceCode=" + deviceCode + '\'' +
                "deviceType=" + deviceType + '\'' +
                "factory=" + factory + '\'' +
                "worker=" + worker + '\'' +
                "mainParams=" + mainParams + '\'' +
                "state=" + state + '\'' +
                "record=" + record + '\'' +
                "lastTime=" + lastTime + '\'' +
                "upTime=" + upTime + '\'' +
                "downTime=" + downTime + '\'' +
                "lockinState=" + lockinState + '\'' +
                "farmId=" + farmId + '\'' +
                "dataId=" + dataId + '\'' +
                '}';
    }
}
