package cn.iocoder.yudao.module.system.enums.device;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum DeviceTypeEnum {

    CHARGING_STATION(1, "充电桩"),
    CONVEYOR_LINE(2, "输送线"),
    PALLETIZER(3, "码垛机"),
    AUTOMATIC_DOOR(4, "自动门"),
    HOIST(5, "提升机"),
    SIGNAL_LIGHT(6, "信号灯"),
    BUTTON_BOX(7, "按钮盒"),
    DISMANTLING_MACHINE(8, "拆垛机"),
    CAMERA(9, "摄像头"),
    FLIP(10, "翻转机");

    /**
     * 类型
     */
    private final Integer type;
    /**
     * 说明
     */
    private final String msg;

    public static Integer getConfigType (Integer type) {
        if (CHARGING_STATION.type.equals(type)) {
            return 5;
        }if (CONVEYOR_LINE.type.equals(type)) {
            return 6;
        }if (PALLETIZER.type.equals(type)) {
            return 7;
        }if (AUTOMATIC_DOOR.type.equals(type)) {
            return 8;
        }if (HOIST.type.equals(type)) {
            return 9;
        }if (SIGNAL_LIGHT.type.equals(type)) {
            return 10;
        }if (BUTTON_BOX.type.equals(type)) {
            return 11;
        }if (FLIP.type.equals(type)) {
            return 14;
        }else {
            return 12;
        }
    }
}
