package org.dromara.ems.record.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.format.DateTimeFormat;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

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

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

    /** 规则编号 */
    @ExcelProperty(value = "规则编号")
    private String ruleId;

    /** 规则名称 */
    @ExcelProperty(value = "规则名称")
    private String ruleName;

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

    /** 记录时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "记录时间")
    private Date collectTime;

    /** 能源类型 */
    @ExcelProperty(value = "能源类型")
    private Long energyType;

    /** 触发规则（0大于 1小于） */
    @ExcelProperty(value = "触发规则")
    private Long triggerRule;

    /** 监测字段 */
    @ExcelProperty(value = "监测字段")
    private Long monitorField;

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

    /** 触发阈值量 */
    @ExcelProperty(value = "触发阈值量")
    private BigDecimal triggerValue;

    /** 通知用户 */
    @ExcelProperty(value = "通知用户")
    private String notifyUser;

    /** 备注 */
    @ExcelProperty(value = "备注")
    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 setMonitorField(Long monitorField)
    {
        this.monitorField = monitorField;
    }

    public Long getMonitorField()
    {
        return monitorField;
    }

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

    public Long getTimeRange()
    {
        return timeRange;
    }

    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 BigDecimal getTriggerValue() {
        return triggerValue;
    }

    public void setTriggerValue(BigDecimal triggerValue) {
        this.triggerValue = triggerValue;
    }

    @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("monitorField", getMonitorField())
            .append("timeRange", getTimeRange())
            .append("triggerValue", getTriggerValue())
            .append("notifyUser", getNotifyUser())
            .append("cause", getCause())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
