package com.muyu.warning.domain;

import com.muyu.common.core.annotation.Excel;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

/**
 * 预警规则对象 warn_rule
 *
 * @author muyu
 * @date 2024-09-20
 */

@Data
@Setter
@Getter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("warn_rule")
public class WarnRule{
    private static final long serialVersionUID = 1L;

    /** 规则id */
    @TableId( type = IdType.AUTO)
    private Long id;

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

    /** 策略id */
    @Excel(name = "策略id")
    private Long strategyId;

    /** 报文数据类型id */
    @Excel(name = "报文数据类型id")
    private Long msgTypeId;

    /** 滑窗时间 */
    @Excel(name = "滑窗时间")
    private Long slideTime;

    /** 滑窗频率 */
    @Excel(name = "滑窗频率")
    private Long slideFrequency;

    /** 最大值 */
    @Excel(name = "最大值")
    private Long maxValue;

    /** 最小值 */
    @Excel(name = "最小值")
    private Long minValue;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("ruleName", getRuleName())
            .append("strategyId", getStrategyId())
            .append("msgTypeId", getMsgTypeId())
            .append("slideTime", getSlideTime())
            .append("slideFrequency", getSlideFrequency())
            .append("maxValue", getMaxValue())
            .append("minValue", getMinValue())
            .toString();
    }
}
