package com.yiqi.common.enums;

/**
 * 用户状态
 * 
 * @author ruoyi
 */
public enum PayType implements CodeEnum
{
    WECHAT("0", "微信"),
    ALIPAY("1", "ALIPAY"),
    CASH("2", "现金"),
    BALANCE("3", "会员余额"),
    UNIONPAY("4", "银联支付"),
    RECHARGE_CARD("5", "储值卡"),
    //组合支付
    COMBINE("8", "组合支付"),
    WAITPAY("9", "等待付款"),
    ;

    private final String code;
    private final String info;

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

    public static PayType getPayType(String code)
    {
        for (PayType payType : PayType.values())
        {
            if (payType.getCode().equals(code))
            {
                return payType;
            }
        }
        return null;
    }

    @Override
    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }
}
