
package com.tmerclub.cloud.order.constant;

/**
 * 财务明细类型 1.订单 2.退款 2.余额充值 3.会员购买
 * @author TRACK
 */
public enum FinanceBizType {
    /**
     * 订单
     */
    ORDER(1, "订单支付"),

    /**
     * 退款
     */
    REFUND(2, "订单退款"),
    /**
     * 余额充值
     */
    RECHARGE(3, "余额充值"),

    /**
     * 会员购买
     */
    LEVEL(4, "会员购买");

    private final Integer num;

    private final String str;

    FinanceBizType(Integer num, String str) {
        this.num = num;
        this.str = str;
    }

    public Integer value() {
        return num;
    }

    public String str() {
        return str;
    }

    public static FinanceBizType instance(Integer value) {
        FinanceBizType[] enums = values();
        for (FinanceBizType statusEnum : enums) {
            if (statusEnum.value().equals(value)) {
                return statusEnum;
            }
        }
        return null;
    }
}
