package com.xy.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 设备故障监控配置
 * </p>
 *
 * @author 谭斌
 * @since 2024-01-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "DeviceFaultMonitorConfig对象", description = "设备故障监控配置")
public class DeviceFaultMonitorConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "monitor_id", type = IdType.ASSIGN_ID)
    private Long monitorId;

    @ApiModelProperty(value = "事件编码")
    private String eventCode;

    @ApiModelProperty(value = "配置描述")
    private String configName;

    @ApiModelProperty(value = "是否已启用")
    private Boolean state;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "标记解决时间")
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "条件2：达到m次")
    private Integer eventNum;

    @ApiModelProperty(value = "条件1：最近n分钟")
    private Long minuteNum;

    @ApiModelProperty(value = "故障级别-字典：device_fault_level")
    private Integer faultLevel;

    @ApiModelProperty(value = "是否转售后")
    private Boolean toAfterSale;

}
