package com.mortals.xhx.module.device.model;

import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.device.model.vo.DeviceAlarmInfoVo;
/**
 * 设备告警日志实体对象
 *
 * @author zxfei
 * @date 2022-08-22
 */

public class DeviceAlarmInfoEntity extends DeviceAlarmInfoVo {
    private static final long serialVersionUID = 1L;

    /**
     * 告警时间
     */
    private Date alarmTime;
    /**
     * 告警设备Id
     */
    private Long alarmDevice;
    /**
     * 站点Id，来源基础服务平台
     */
    private Long siteId;
    /**
     * 告警类型,(0.离线)
     */
    private Integer alarmType;
    /**
     * 告警级别(0.危险，1.次要，2.一般)
     */
    private Integer alarmLevel;
    /**
     * 接收人员[设备管理的责任人]
     */
    private String alarmReceivePersonnel;
    /**
     * 接收人员电话
     */
    private String receivePersonnelTelephone;
    /**
     * 告警状态,来自工单系统(0.未清除，1.清除未确认，2.清除已确认)
     */
    private Integer alarmStatus;
    /**
     * 告警详细内容
     */
    private String alarmContent;



    public DeviceAlarmInfoEntity(){}
    /**
     * 获取 告警时间
     * @return Date
     */
    public Date getAlarmTime(){
        return alarmTime;
    }
    /**
     * 设置 告警时间
     * @param alarmTime
     */
    public void setAlarmTime(Date alarmTime){
        this.alarmTime = alarmTime;
    }
    /**
     * 获取 告警设备Id
     * @return Long
     */
    public Long getAlarmDevice(){
        return alarmDevice;
    }
    /**
     * 设置 告警设备Id
     * @param alarmDevice
     */
    public void setAlarmDevice(Long alarmDevice){
        this.alarmDevice = alarmDevice;
    }
    /**
     * 获取 站点Id，来源基础服务平台
     * @return Long
     */
    public Long getSiteId(){
        return siteId;
    }
    /**
     * 设置 站点Id，来源基础服务平台
     * @param siteId
     */
    public void setSiteId(Long siteId){
        this.siteId = siteId;
    }
    /**
     * 获取 告警类型,(0.离线)
     * @return Integer
     */
    public Integer getAlarmType(){
        return alarmType;
    }
    /**
     * 设置 告警类型,(0.离线)
     * @param alarmType
     */
    public void setAlarmType(Integer alarmType){
        this.alarmType = alarmType;
    }
    /**
     * 获取 告警级别(0.危险，1.次要，2.一般)
     * @return Integer
     */
    public Integer getAlarmLevel(){
        return alarmLevel;
    }
    /**
     * 设置 告警级别(0.危险，1.次要，2.一般)
     * @param alarmLevel
     */
    public void setAlarmLevel(Integer alarmLevel){
        this.alarmLevel = alarmLevel;
    }
    /**
     * 获取 接收人员[设备管理的责任人]
     * @return String
     */
    public String getAlarmReceivePersonnel(){
        return alarmReceivePersonnel;
    }
    /**
     * 设置 接收人员[设备管理的责任人]
     * @param alarmReceivePersonnel
     */
    public void setAlarmReceivePersonnel(String alarmReceivePersonnel){
        this.alarmReceivePersonnel = alarmReceivePersonnel;
    }
    /**
     * 获取 接收人员电话
     * @return String
     */
    public String getReceivePersonnelTelephone(){
        return receivePersonnelTelephone;
    }
    /**
     * 设置 接收人员电话
     * @param receivePersonnelTelephone
     */
    public void setReceivePersonnelTelephone(String receivePersonnelTelephone){
        this.receivePersonnelTelephone = receivePersonnelTelephone;
    }
    /**
     * 获取 告警状态,来自工单系统(0.未清除，1.清除未确认，2.清除已确认)
     * @return Integer
     */
    public Integer getAlarmStatus(){
        return alarmStatus;
    }
    /**
     * 设置 告警状态,来自工单系统(0.未清除，1.清除未确认，2.清除已确认)
     * @param alarmStatus
     */
    public void setAlarmStatus(Integer alarmStatus){
        this.alarmStatus = alarmStatus;
    }
    /**
     * 获取 告警详细内容
     * @return String
     */
    public String getAlarmContent(){
        return alarmContent;
    }
    /**
     * 设置 告警详细内容
     * @param alarmContent
     */
    public void setAlarmContent(String alarmContent){
        this.alarmContent = alarmContent;
    }




    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof DeviceAlarmInfoEntity) {
            DeviceAlarmInfoEntity tmp = (DeviceAlarmInfoEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",alarmTime:").append(getAlarmTime());
        sb.append(",alarmDevice:").append(getAlarmDevice());
        sb.append(",siteId:").append(getSiteId());
        sb.append(",alarmType:").append(getAlarmType());
        sb.append(",alarmLevel:").append(getAlarmLevel());
        sb.append(",alarmReceivePersonnel:").append(getAlarmReceivePersonnel());
        sb.append(",receivePersonnelTelephone:").append(getReceivePersonnelTelephone());
        sb.append(",alarmStatus:").append(getAlarmStatus());
        sb.append(",alarmContent:").append(getAlarmContent());
        return sb.toString();
    }

    public void initAttrValue(){

        this.alarmTime = null;

        this.alarmDevice = null;

        this.siteId = null;

        this.alarmType = null;

        this.alarmLevel = null;

        this.alarmReceivePersonnel = "";

        this.receivePersonnelTelephone = "";

        this.alarmStatus = 0;

        this.alarmContent = "";
    }
}