package com.huimv.receiver.farm.dao.entity;

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

@Entity
@Table(name = "base_warning_info")
public class BaseWarningInfoEntity implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

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

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

    @Column(name = "level_name")
    private String levelName;

    @Column(name = "warning_name")
    private String warningName;

    @Column(name = "warning_time")
    private Timestamp warningTime;

    @Column(name = "upload_time")
    private Timestamp uploadTime;

    /**
     * 警报类型
     */
    @Column(name = "alarm_type")
    private Integer alarmType;

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

    public Integer getId() {
        return id;
    }

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

    public Integer getFarmId() {
        return farmId;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getLevel() {
        return level;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public void setLevelName(String levelName) {
        this.levelName = levelName;
    }

    public String getLevelName() {
        return levelName;
    }

    public void setWarningName(String warningName) {
        this.warningName = warningName;
    }

    public String getWarningName() {
        return warningName;
    }

    public void setWarningTime(Timestamp warningTime) {
        this.warningTime = warningTime;
    }

    public Timestamp getWarningTime() {
        return warningTime;
    }

    public void setUploadTime(Timestamp uploadTime) {
        this.uploadTime = uploadTime;
    }

    public Timestamp getUploadTime() {
        return uploadTime;
    }

    /**
     * 警报类型
     */
    public void setAlarmType(Integer alarmType) {
        this.alarmType = alarmType;
    }

    /**
     * 警报类型
     */
    public Integer getAlarmType() {
        return alarmType;
    }

    @Override
    public String toString() {
        return "BaseWarningInfoEntity{" +
                "id=" + id + '\'' +
                "farmId=" + farmId + '\'' +
                "level=" + level + '\'' +
                "msg=" + msg + '\'' +
                "levelName=" + levelName + '\'' +
                "warningName=" + warningName + '\'' +
                "warningTime=" + warningTime + '\'' +
                "uploadTime=" + uploadTime + '\'' +
                "alarmType=" + alarmType + '\'' +
                '}';
    }
}
