package net.northking.cctp.scriptcase.enums;

public enum PlatformType {
    ANDROID("0","android"),
    IOS("1","ios"),
    HARMONYOS("2","harmonyos"),
    OTHER("3","other");
    private String code;
    private String name;
    PlatformType(String code, String name){
        this.code = code;
        this.name = name;
    }
    public static String getName(String code){
        for (PlatformType value : PlatformType.values()) {
            if (code.equals(value.code)) {
                return value.name;
            }
        }
        return "";
    }

    public static String getCode(String name){
        for (PlatformType value : PlatformType.values()) {
            if (name.equals(value.name)) {
                return value.code;
            }
        }
        return "";
    }
}
