package com.qmth.teachcloud.common.enums.clientpackage;

import java.util.Objects;

/**
 * 客户端包类型
 */
public enum ClientPackageEnum {

    INSTALL("安装包"),

    UPGRADE("升级包");

    private String name;

    private ClientPackageEnum(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    /**
     * 状态转换 toName
     *
     * @param name
     * @return
     */
    public static String convertToName(String name) {
        for (ClientPackageEnum e : ClientPackageEnum.values()) {
            if (Objects.equals(name, e.getName())) {
                return e.name();
            }
        }
        return null;
    }
}
