Newer
Older
huludao / src / main / java / com / newfiber / api / pc / model / entity / DeviceAlarm.java
package com.newfiber.api.pc.model.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

@Data
@ApiModel
public class DeviceAlarm implements Serializable {

    @JsonSerialize(using= ToStringSerializer.class)
    @TableId(value="id",type = IdType.AUTO )
    private Long id;
    @ApiModelProperty("报警类型(1积水点 ) 2河道位液 3雨量站")
    private Integer alarmType;
    @ApiModelProperty("报警类型(1积水点 ) 2河道位液 3雨量站")
    @TableField(exist = false)
    private String alarmTypeDesc;
    @ApiModelProperty("1.积水点 2河道位液 3雨量站")
    private String alarmName;
    @ApiModelProperty("预警名称")
    private String name;
    @ApiModelProperty("报警地址")
    private String address;
    @ApiModelProperty("报警内容")
    private String alarmDesc;
    @ApiModelProperty("采集时间")
    private Date recordTime;
    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("报警因子")
    @TableField(exist = false)
    private String factorsAscii;

    @ApiModelProperty("/** 比较方式(>,<,=) */")
    @TableField(exist = false)
    private String compareWay;

    @ApiModelProperty("报警状态:1报警,2恢复")
    private Byte status;

    @ApiModelProperty("报警类型1时为积水点编号,报警类型为2,3时为站点编号")
    private String siteNo;

    @ApiModelProperty("1为设备断线报警")
    private Byte deviceType;

    @ApiModelProperty("经度")
    private String lon;

    @ApiModelProperty("纬度")
    private String lat;
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("水深")
    private String depth;

    @TableField(exist = false)
    private String currentState;

    @TableField(exist = false)
    private String header;

    @TableField(exist = false)
    private String link;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        com.newfiber.api.pc.model.entity.DeviceAlarm that = (com.newfiber.api.pc.model.entity.DeviceAlarm) o;
        return siteNo.equals(that.siteNo);
    }

    @Override
    public int hashCode() {
        return Objects.hash(siteNo);
    }
}