//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.chushang.common.core.enums;

import com.chushang.common.core.exception.ResultException;
import lombok.Getter;

@Getter
public enum PassCodeEnum {
    PUBLIC("PUBLIC", "公开", false),
    PLATFORM("PLATFORM", "管理平台", true),
    MINI("MINI", "小程序", true),
    APP("APP", "应用", true),
    ;

    private final String code;
    private final String name;
    private final Boolean openReg;

    private PassCodeEnum(String code, String name, boolean openReg) {
        this.code = code;
        this.name = name;
        this.openReg = openReg;
    }

    public static PassCodeEnum getEnumByCode(String code) {
        PassCodeEnum[] var1 = values();
        for (PassCodeEnum e : var1) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        throw new ResultException("非法的应用");
    }
}
