package com.ff.base.enums;

/**
 * 会员状态
 *
 * @author liukang
 */
public enum MemberStatus
{
    /**
     * 账号状态（0正常 1手动冻结 2异常冻结 3禁止领取优惠 4禁止提现 5黑名单 6停用 7禁止进入游戏 8自我禁止-限制游戏 9自我禁止-限制参与优惠 10自我禁止-限制登录）
     */
    MemberStatus_0("0", "正常"),
    MemberStatus_1("1", "手动冻结"),
    MemberStatus_2("2", "异常冻结"),
    MemberStatus_3("3", "禁止领取优惠"),
    MemberStatus_4("4", "禁止提现"),
    MemberStatus_5("5", "黑名单"),
    MemberStatus_6("6", "停用"),
    MemberStatus_7("7", "禁止进入游戏"),
    MemberStatus_8("8", "自我禁止-限制游戏"),
    MemberStatus_9("9", "自我禁止-限制参与优惠"),
    MemberStatus_10("10", "自我禁止-限制登录");

    private final String code;
    private final String info;

    MemberStatus(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public static MemberStatus getMemberStatusTypeByCode(String code)
    {
        for (MemberStatus item : MemberStatus.values()) {
            if(item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }
}
