package com.ruoyi.pay.enums;

import java.util.Arrays;

/**
 * 支付来源枚举
 * @Author liwenlong
 */
public enum PaySourceEnums {

    order_pay(1, "订单首款支付"),

    order_second_pay(2, "订单尾款支付"),

    recharge_pay(3, "充值"),

    auth_pay(4, "普通认证支付"),

    highend_auth_pay(5, "高端认证支付"),

    bond_pay(6, "保证金支付"),


    adjust_price_pay(7, "设计师调价定金支付"),

    store_adjust_price_pay(8, "表现师调价设计师定金支付"),


    mall_order_pay(9, "商城订单支付"),


    ;

    private final Integer code;
    private final String name;

    public static String getName(Integer code) {
        return getPaySourceEnums(code).name;
    }


    public static PaySourceEnums getPaySourceEnums(Integer code) {
        return Arrays.stream(PaySourceEnums.values()).filter(c->c.getCode().equals(code)).findFirst().get();
    }

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

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }


}
