package com.reyun.dic;

/**
 * description:
 *
 * @author nolan
 * @date 29/12/2017
 */
public enum AppTypeEnum
{
    TEST("00", "测试"),
    GAME("02", "游戏"),
    APP("04", "应用");

    private String code;
    private String val;

    AppTypeEnum(String code, String val) {
        this.code = code;
        this.val = val;
    }

    public static AppTypeEnum getVal(String code) {
        for (AppTypeEnum appTypeEnum : AppTypeEnum.values()) {
            if (appTypeEnum.getCode().equals(code)) {
                return appTypeEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getVal() {
        return val;
    }
}
