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

import com.baomidou.mybatisplus.annotation.*;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.Getter;
import lombok.Setter;
import vion.dto.BaseDTO;
import vion.dto.monitor.EventDTO;
import vion.vo.monitor.EventVO;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 监测事件
 */
@Getter
@Setter
@TableName(value = "m_event")
@AutoMappers({
        @AutoMapper(target = EventVO.class),
        @AutoMapper(target = EventDTO.class),
})
public class Event extends BaseDTO {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 类型 0:store+mall 1:store,2:mall
     */
    @TableField(value = "type")
    private Short type;

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

    /**
     * 事件名称
     */
    @TableField(value = "\"name\"", condition = SqlCondition.LIKE)
    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 = "description")
    private String description;


    /**
     * 备注
     */
    @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;

    @TableField(exist = false)
    private List<Long> typeList;
}