package com.fuyuanshen.equipment.domain.vo;

import lombok.Data;

/**
 * 设备分类
 *
 * @author: 默苍璃
 * @date: 2025-09-0114:24
 */
@Data
public class EquipmentClassificationVo {

    /**
     * 4G设备
     */
    private Integer equipment4G = 0;

    /**
     * 蓝牙设备
     */
    private Integer deviceBluetooth = 0;

    /**
     * 4G & 蓝牙 设备
     */
    private Integer devices4GAndBluetooth = 0;

    /**
     * 设备总数
     */
    private Integer total;


    /**
     * 计算设备总数
     *
     * @return 设备总数
     */
    public Integer getTotal() {
        if (total == null) {
            total = (equipment4G == null ? 0 : equipment4G) +
                    (deviceBluetooth == null ? 0 : deviceBluetooth) +
                    (devices4GAndBluetooth == null ? 0 : devices4GAndBluetooth);
        }
        return total;
    }

}
