package org.wcs.plugin.plc.constant;

import lombok.Getter;

@Getter
public enum PlcTypeEnum {

    SIEMENS(1, "西门子");

    private final Integer code;
    private final String message;

    PlcTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static PlcTypeEnum getMessage(Integer code) {
        for (PlcTypeEnum value : PlcTypeEnum.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return PlcTypeEnum.SIEMENS;
    }
}
