package com.casic.missiles.modular.system.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

/**
 * <p>
 * 报警规则表
 * </p>
 *
 * @author casic123
 * @since 2019-05-17
 */
@TableName("alarm_rule")
public class AlarmRule extends Model<AlarmRule> {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;
    /**
     * 设备编号
     */
    @TableField("DEVCODE")
    private String devcode;
    /**
     * 报警上限
     */
    @TableField("HIGHVALUE")
    private Float highvalue;
    /**
     * 报警下限
     */
    @TableField("LOWVALUE")
    private Float lowvalue;
    /**
     * 超时时间
     */
    @TableField("OVERTIME")
    private Float overtime;
    /**
     * 突然阈值
     */
    @TableField("SALTATION")
    private Float saltation;
    /**
     * 传感器编号
     */
    @TableField("SENSORCODE")
    private String sensorcode;
    /**
     * 报警等级
     */
    @TableField("GRADE")
    private String grade;
    /**
     * 时间戳
     */
    @TableField("TS")
    private Date ts;


    public Integer getId() {
        return id;
    }

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

    public String getDevcode() {
        return devcode;
    }

    public void setDevcode(String devcode) {
        this.devcode = devcode;
    }

    public Float getHighvalue() {
        return highvalue;
    }

    public void setHighvalue(Float highvalue) {
        this.highvalue = highvalue;
    }

    public Float getLowvalue() {
        return lowvalue;
    }

    public void setLowvalue(Float lowvalue) {
        this.lowvalue = lowvalue;
    }

    public Float getOvertime() {
        return overtime;
    }

    public void setOvertime(Float overtime) {
        this.overtime = overtime;
    }

    public Float getSaltation() {
        return saltation;
    }

    public void setSaltation(Float saltation) {
        this.saltation = saltation;
    }

    public String getSensorcode() {
        return sensorcode;
    }

    public void setSensorcode(String sensorcode) {
        this.sensorcode = sensorcode;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public Date getTs() {
        return ts;
    }

    public void setTs(Date ts) {
        this.ts = ts;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "AlarmRule{" +
        "id=" + id +
        ", devcode=" + devcode +
        ", highvalue=" + highvalue +
        ", lowvalue=" + lowvalue +
        ", overtime=" + overtime +
        ", saltation=" + saltation +
        ", sensorcode=" + sensorcode +
        ", grade=" + grade +
        ", ts=" + ts +
        "}";
    }
}
