package com.zcxk.charge.api.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zcxk.core.common.pojo.ProgramItem;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * @description
 * @author wangli
 * @data 2020-11-16 11:48
 */
@Api("报警信息")
@Data
public class AlarmDetailsEntityVo {

    private static final long serialVersionUID = -3866939316262264972L;

    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "租户标识")
    private String tenantId;

    @ApiModelProperty("一级场景信息")
    private Integer parentSceneId;

    @ApiModelProperty("一级场景名称")
    private String parentSceneName;

    @ApiModelProperty("场景信息")
    private Integer sceneId;

    @ApiModelProperty("场景名称")
    private String sceneName;

    @ApiModelProperty(value = "设备信息")
    private Integer deviceId;

    @ApiModelProperty(value = "所属公司")
    private Integer companyOrgId;

    @ApiModelProperty(value = "所属部门")
    private Integer deptOrgId;

    @ApiModelProperty(value = "报警参数设置id")
    private Integer alarmSettingId;

    @ApiModelProperty(value = "报警类型")
    private String alarmType;
    @ApiModelProperty(value = "报警参数ID")
    private Integer attributeId;
    @ApiModelProperty(value = "当前数值")
    private Double alarmValue;
    @ApiModelProperty(value = "最小告警数值")
    private Double minValue;
    @ApiModelProperty(value = "最大告警数值")
    private Double maxValue;
    @ApiModelProperty(value = "报警详情")
    private String alarmContent;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ApiModelProperty(value = "报警开始时间",example = "2020-12-12 12:12:12")
    private Date alarmStartTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ApiModelProperty(value = "报警结束时间",example = "2020-12-12 12:12:12")
    private Date alarmEndTime;
    @ApiModelProperty(value = "报警状态:1 实时报警 0 历史报警")
    private Integer state;
    @ApiModelProperty(value = "处理状态:1 正常 0 挂起")
    private Integer opState;

    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "数据删除标识")
    private Integer status;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间",example = "2020-12-12 12:12:12")
    private Date dateCreate;
    @ApiModelProperty(value = "创建人")
    private String createBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间",example = "2020-12-12 12:12:12")
    private Date dateUpdate;
    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty("设备名称")
    private String deviceName;
    @ApiModelProperty("设备类型")
    private String deviceType;
    @ApiModelProperty("地址")
    private String address;
    @ApiModelProperty("经度")
    private BigDecimal pointX;
    @ApiModelProperty("维度")
    private BigDecimal pointY;
    @ApiModelProperty("持续时间，单位分钟")
    private Integer duration;

    @ApiModelProperty(value ="属性单位")
    private String unit;

    @ApiModelProperty(value ="报警参数")
    private String attributeName;

    @ApiModelProperty(value ="报警规则")
    private String alermRule;

    @ApiModelProperty(value ="查询条件：设备名称",hidden = true)
    private String condition;

    @ApiModelProperty(value = "开始时间",hidden = true)
    private Date startTime;
    @ApiModelProperty(value = "结束时间" ,hidden = true)
    private Date endTime;

    @ApiModelProperty(value = "场景ids" ,hidden = true )
    private List<Long> sceneIds;


    @ApiModelProperty(value ="权限",hidden = true)
    @JsonIgnore
    private List<ProgramItem> programItems;

    @ApiModelProperty(value="用户权限类型",hidden = true)
    @JsonIgnore
    private Integer permissonType;

    /** 用户类型 */
    @ApiModelProperty(value = "用户类型(-9999 超管 -999普通用户 2普通用户)",hidden = true)
    @JsonIgnore
    private String userType;

    @ApiModelProperty(value ="一级场景类型名称",hidden = true)
    @JsonIgnore
    private String sceneTypeName;

    @ApiModelProperty(value ="查询天数",hidden = true)
    @JsonIgnore
    private Integer days;

    @ApiModelProperty(value = "报警范围")
    private String alarmRange;

}
