package com.yuchen.saas.park.api.vo.park;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;


@Data
public class WarningDetailListVo {
    @JsonSerialize(
            using = ToStringSerializer.class
    )
    private Long id;

    @ApiModelProperty(value = "告警设备名称")
    private String name;
    @ApiModelProperty(value = "园区名称")
    private String parkName;
    @ApiModelProperty(value = "告警时间")
    private Long eventTime;
    @ApiModelProperty(value = "告警事件编号")
    private String identity;
    @ApiModelProperty(value = "告警事件/告警描述")
    private String remark;
    @ApiModelProperty(value = "风险等级")
    private Integer level;
    @ApiModelProperty(value = "风险等级名称")
    private String levelName;
    @ApiModelProperty(value = "告警地点")
    private String setPosition;
    @ApiModelProperty(value = "告警照片")
    private String bkgUrl;
    @ApiModelProperty(value = "处理状态 1：未处理，2：处理中，3：已处理，4：已忽略")
    private Integer status;

    public String getEventTime(){
        if(this.eventTime==null){
            return null;
        }
        return DateUtil.format(new Date(this.eventTime),"yyyy-MM-dd HH:mm:ss");
    }
}
