package com.hw.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.hw.common.core.annotation.Excel;
import com.hw.common.core.web.domain.BaseEntity;

/**
 * 异常告警规则对象 record_alarm_rule
 *
 * @author sf
 * @date 2023-04-21
 */
public class RecordAlarmRule 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;

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

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

    /** 触发规则 */
    @Excel(name = "触发规则")
    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;

    /** 权限标识（部门） */
    @Excel(name = "权限标识", readConverterExp = "部=门")
    private Long deptId;

    /** 权限标识（用户） */
    @Excel(name = "权限标识", readConverterExp = "用=户")
    private Long userId;

    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;
    }
    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getDeptId()
    {
        return deptId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }

    @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())
            .append("deptId", getDeptId())
            .append("userId", getUserId())
            .toString();
    }
}
