package com.centreproject.system.domain.sync.kpi;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 报警记录实体类
 * @author zhonglei.xu
 */
@Data
@Accessors(chain = true)
@TableName("alert_record")
public class AlertRecord {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("module_name")
    private String moduleName;

    @TableField("field_name")
    private String fieldName;

    @TableField("current_value")
    private BigDecimal currentValue;

    @TableField("threshold_min")
    private BigDecimal thresholdMin;

    @TableField("threshold_max")
    private BigDecimal thresholdMax;

    @TableField("alert_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date alertTime;

    @TableField("alert_status")
    private Integer alertStatus;

    @TableField("process_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date processTime;

    @TableField("process_by")
    private String processBy;

    @TableField("alert_content")
    private String alertContent;

    @TableField("alert_emails")
    private String alertEmails;

}