Event.java 1.62 KB
package vion.model.monitor;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 监测事件
 */
@Getter
@Setter
@TableName(value = "m_event")
public class Event {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 唯一标识
     */
    @TableField(value = "\"uid\"")
    private String uid;

    /**
     * 事件名称
     */
    @TableField(value = "\"name\"")
    private String name;

    /**
     * 事件类型
     */
    @TableField(value = "event_type")
    private String eventType;

    /**
     * 来源 1:系统 2:设备 3:平台
     */
    @TableField(value = "\"source\"")
    private Short source;

    /**
     * 监测时间
     */
    @TableField(value = "cron")
    private String cron;

    /**
     * 默认阈值,可为空
     */
    @TableField(value = "threshold")
    private String threshold;

    /**
     * 对比周期
     */
    @TableField(value = "contrast_period")
    private String contrastPeriod;

    /**
     * 规则
     */
    @TableField(value = "\"rule\"")
    private Object rule;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 修改人
     */
    @TableField(value = "update_by")
    private String updateBy;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}