package cn.iocoder.yudao.module.product.enums;

import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum DeviceTypeEnums implements IntArrayValuable {

    CONTROLLER(1, "控制器"),
    SENSOR(2, "传感器"),
    MONITOR(3, "监控");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeviceTypeEnums::getDeviceType).toArray();

    /**
     * 上链状态
     */
    private final Integer deviceType;

    /**
     * 状态名
     */
    private final String typeName;

    @Override
    public int[] array() {
        return ARRAYS;
    }
}
