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

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.alarm.model.vo.AlarmConfigVo;
/**
 * 设备告警配置实体对象
 *
 * @author zxfei
 * @date 2022-07-04
 */

public class AlarmConfigEntity extends AlarmConfigVo {
    private static final long serialVersionUID = 1L;

    /**
     * 产品
     */
    private Long productId;
    /**
     * 告警类型(0.离线)
     */
    private Integer alarmType;
    /**
     * 告警级别,(0.危险，1.次要，2.一般)
     */
    private Integer alarmLevel;
    /**
     * 推送方式,(0.不推送，1.短信)
     */
    private Integer alarmPusW1ay;
    /**
     * 是否启用(0.不启用，1.启用)
     */
    private Integer enabled;
    /**
     * 备注
     */
    private String remark;



    public AlarmConfigEntity(){}
    /**
     * 获取 产品
     * @return Long
     */
    public Long getProductId(){
        return productId;
    }
    /**
     * 设置 产品
     * @param productId
     */
    public void setProductId(Long productId){
        this.productId = productId;
    }
    /**
     * 获取 告警类型(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;
    }
    /**
     * 获取 推送方式,(0.不推送，1.短信)
     * @return Integer
     */
    public Integer getAlarmPusW1ay(){
        return alarmPusW1ay;
    }
    /**
     * 设置 推送方式,(0.不推送，1.短信)
     * @param alarmPusW1ay
     */
    public void setAlarmPusW1ay(Integer alarmPusW1ay){
        this.alarmPusW1ay = alarmPusW1ay;
    }
    /**
     * 获取 是否启用(0.不启用，1.启用)
     * @return Integer
     */
    public Integer getEnabled(){
        return enabled;
    }
    /**
     * 设置 是否启用(0.不启用，1.启用)
     * @param enabled
     */
    public void setEnabled(Integer enabled){
        this.enabled = enabled;
    }
    /**
     * 获取 备注
     * @return String
     */
    public String getRemark(){
        return remark;
    }
    /**
     * 设置 备注
     * @param remark
     */
    public void setRemark(String remark){
        this.remark = remark;
    }




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

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",productId:").append(getProductId());
        sb.append(",alarmType:").append(getAlarmType());
        sb.append(",alarmLevel:").append(getAlarmLevel());
        sb.append(",alarmPusW1ay:").append(getAlarmPusW1ay());
        sb.append(",enabled:").append(getEnabled());
        sb.append(",remark:").append(getRemark());
        return sb.toString();
    }

    public void initAttrValue(){

        this.productId = null;

        this.alarmType = 0;

        this.alarmLevel = 2;

        this.alarmPusW1ay = 0;

        this.enabled = 1;

        this.remark = "";
    }
}