package com.hfkj.sysenum;

import java.util.Objects;

/**
 * 交易订单 支付方式
 * @author hurui
 */
public enum TradeOrderPayModeEnum {
    WECHAT("WECHAT", "微信"),
    ALIPAY("ALIPAY", "支付宝"),
    UQRCODEPAY("UQRCODEPAY", "银联"),
    DRAGON("DRAGON", "【建行】龙支付")
    ;

    private String code;

    private String name;

    TradeOrderPayModeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static TradeOrderPayModeEnum getNameByCode(String code) {
        for (TradeOrderPayModeEnum ele : values()) {
            if (Objects.equals(code,ele.getCode())) {
                return ele;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
