package com.pwt.netty.message2;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

/**
 * 报警统计
 */

public class AlarmStatistics extends BaseData{

    /**
     *  1: 站控 2 机器人 3充电(机)枪 4 电池 5 车载控制器
     */
    @Getter
    @Setter
    private int sourceDeviceType;

    private String id;

    public String getId() {
        return sourceDeviceType + "";
    }

    /**
     * 当前报警数
     */
    @Getter
    @Setter
    private int count;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AlarmStatistics that = (AlarmStatistics) o;
        return sourceDeviceType == that.sourceDeviceType;
    }

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