package com.fdkankan.common.constant;

public enum LoginType {

    USER("User"),
    MANAGER("Manager"),
    AGENT("Agent"),
    APP("App");

    private String code;

    private LoginType(String code) {
        this.code = code;
    }

    public String code() {
        return code;
    }

    public static LoginType get(String code){
        LoginType[] values = LoginType.values();
        String enumValue = null;
        for(LoginType eachValue : values){
            enumValue = eachValue.code();
            if(enumValue.equals(code)){
                return eachValue;
            }
        }
        return null;
    }


}
