package com.ruoyi.ems.record.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 异常告警规则对象 ems_record_alarm_rule
 *
 * @author Yinq
 * @date 2024-05-15
 */
public class EmsRecordAlarmRule extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增标识 */
    private Long objId;

    /** 规则编号 */
    @Excel(name = "规则编号")
    private String ruleId;

    /** 规则名称 */
    @Excel(name = "规则名称")
    private String ruleName;

    /** 计量设备编号 */
    @Excel(name = "计量设备编号")
    private String monitorId;
    private String monitorCode;
    private String monitorName;

    /** 记录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date collectTime;

    /** 能源类型 */
    @Excel(name = "能源类型")
    private Long energyType;

    /** 触发规则（0超过阈值 1设备报警） */
    @Excel(name = "触发规则", readConverterExp = "0=超过阈值,1=设备报警")
    private Long triggerRule;

    /** 触发阈值次数 */
    @Excel(name = "触发阈值次数")
    private Long triggerNumber;

    /** 时间范围(分) */
    @Excel(name = "时间范围(分)")
    private Long timeRange;

    /** 设备离线时间(分) */
    @Excel(name = "设备离线时间(分)")
    private Long deviceOfflineTime;

    /** 通知用户 */
    @Excel(name = "通知用户")
    private String notifyUser;

    /** 备注 */
    @Excel(name = "备注")
    private String cause;

    private String nickName;

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getMonitorCode() {
        return monitorCode;
    }

    public void setMonitorCode(String monitorCode) {
        this.monitorCode = monitorCode;
    }

    public String getMonitorName() {
        return monitorName;
    }

    public void setMonitorName(String monitorName) {
        this.monitorName = monitorName;
    }

    public void setObjId(Long objId)
    {
        this.objId = objId;
    }

    public Long getObjId()
    {
        return objId;
    }
    public void setRuleId(String ruleId)
    {
        this.ruleId = ruleId;
    }

    public String getRuleId()
    {
        return ruleId;
    }
    public void setRuleName(String ruleName)
    {
        this.ruleName = ruleName;
    }

    public String getRuleName()
    {
        return ruleName;
    }
    public void setMonitorId(String monitorId)
    {
        this.monitorId = monitorId;
    }

    public String getMonitorId()
    {
        return monitorId;
    }
    public void setCollectTime(Date collectTime)
    {
        this.collectTime = collectTime;
    }

    public Date getCollectTime()
    {
        return collectTime;
    }
    public void setEnergyType(Long energyType)
    {
        this.energyType = energyType;
    }

    public Long getEnergyType()
    {
        return energyType;
    }
    public void setTriggerRule(Long triggerRule)
    {
        this.triggerRule = triggerRule;
    }

    public Long getTriggerRule()
    {
        return triggerRule;
    }
    public void setTriggerNumber(Long triggerNumber)
    {
        this.triggerNumber = triggerNumber;
    }

    public Long getTriggerNumber()
    {
        return triggerNumber;
    }
    public void setTimeRange(Long timeRange)
    {
        this.timeRange = timeRange;
    }

    public Long getTimeRange()
    {
        return timeRange;
    }
    public void setDeviceOfflineTime(Long deviceOfflineTime)
    {
        this.deviceOfflineTime = deviceOfflineTime;
    }

    public Long getDeviceOfflineTime()
    {
        return deviceOfflineTime;
    }
    public void setNotifyUser(String notifyUser)
    {
        this.notifyUser = notifyUser;
    }

    public String getNotifyUser()
    {
        return notifyUser;
    }
    public void setCause(String cause)
    {
        this.cause = cause;
    }

    public String getCause()
    {
        return cause;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("objId", getObjId())
            .append("ruleId", getRuleId())
            .append("ruleName", getRuleName())
            .append("monitorId", getMonitorId())
            .append("collectTime", getCollectTime())
            .append("energyType", getEnergyType())
            .append("triggerRule", getTriggerRule())
            .append("triggerNumber", getTriggerNumber())
            .append("timeRange", getTimeRange())
            .append("deviceOfflineTime", getDeviceOfflineTime())
            .append("notifyUser", getNotifyUser())
            .append("cause", getCause())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
