package com.zksy.WaterSupply.MonitorAlarm.dto.out;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 供水监测报警信息-出参（实时异常卡片/历史列表/详情共用）
 */
@Data
@ApiModel(value = "供水监测报警信息-出参", description = "报警基础信息 + 设备信息，字段参考报警数据表及设备数据表")
public class WaterAlarmOutDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "报警ID", example = "uuid")
    private String id;

    @ApiModelProperty(value = "设备编码", example = "SB001")
    private String deviceCode;

    @ApiModelProperty(value = "设备名称", example = "XX供水压力监测点")
    private String deviceName;

    @ApiModelProperty(value = "设备ID", example = "EQ001")
    private String equipmentId;

    @ApiModelProperty(value = "设备类型（预警类型分类）", example = "压力监测")
    private String deviceType;

    @ApiModelProperty(value = "设备位置", example = "XX大道XX号")
    private String equipmentLocation;

    @ApiModelProperty(value = "经度", example = "113.12345678")
    private String longitude;

    @ApiModelProperty(value = "纬度", example = "23.12345678")
    private String latitude;

    @ApiModelProperty(value = "预警类型", example = "压力预警")
    private String warningType;

    @ApiModelProperty(value = "预警编码", example = "WARN-PRESSURE")
    private String warningCode;

    @ApiModelProperty(value = "报警参数值（实际值）", example = "0.32")
    private BigDecimal actualValue;

    @ApiModelProperty(value = "阈值下限", example = "0.40")
    private BigDecimal minValue;

    @ApiModelProperty(value = "阈值上限", example = "0.80")
    private BigDecimal maxValue;

    @ApiModelProperty(value = "偏差率（百分比）", example = "20.00")
    private BigDecimal deviationRatio;

    @ApiModelProperty(value = "报警等级：1-4，1级最高", example = "1")
    private Integer alarmLevel;

    @ApiModelProperty(value = "报警等级文本", example = "一级报警")
    private String alarmLevelText;

    @ApiModelProperty(value = "报警状态：0-未处理 1-已处理", example = "0")
    private Integer alarmStatus;

    @ApiModelProperty(value = "报警状态文本", example = "待处理")
    private String alarmStatusText;

    @ApiModelProperty(value = "报警时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime alarmTime;

    @ApiModelProperty(value = "处理时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime handleTime;

    @ApiModelProperty(value = "处理人")
    private String handleUser;

    @ApiModelProperty(value = "处理备注")
    private String handleRemark;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "关联工单编号（已派发工单时返回）")
    private String orderNo;

    @ApiModelProperty(value = "关联工单状态（已派发工单时返回）")
    private Integer orderStatus;
}
