package cn.com.ctop.alarm.modules.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 制定详细规则表
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2020-10-29
 */
@Data
@TableName("ctop_alarm_event_metric")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ctop_alarm_event_metric对象", description = "制定详细规则表")
public class AlarmEventMetric {

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键id")
    private Long eventMetricId;
    /**
     * 规则id
     */
    @Excel(name = "规则id", width = 15)
    @ApiModelProperty(value = "规则id")
    private Long eventRuleId;
    /**
     * 指标标识
     */
    @Excel(name = "指标标识", width = 15)
    @ApiModelProperty(value = "指标标识")
    private String metricValueCode;

    private String metricValueName;
    /**
     * 判断方式 > >= < <= =
     */
    @Excel(name = "判断方式 > >= < <= =", width = 15)
    @ApiModelProperty(value = "判断方式 > >= < <= =")
    private String judgeMethod;
    /**
     * 判断类型 1-金额
     */
    private String judgeType;
    /**
     * 阈值
     */
    @Excel(name = "阈值", width = 15)
    @ApiModelProperty(value = "阈值")
    private String threshold;
    /**
     * 下限阈值
     */
    private String minThreshold;
    /**
     * createTime
     */
    @Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "createTime")
    private Date createTime;
    /**
     * updateTime
     */
    @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;
    /**
     * 数据范围：TODAY_DATA-当天数据
     */
    private String dataRange;
}
