package com.cpop.jambox.framework.enums;

import lombok.Getter;

/**
 * @author DB
 * @version 1.0.0
 * @since 2023-12-28 16:23
 */
@Getter
public enum EasyLearnPayPayEnum {

    /**
     * 放心学次付
     */
    EASY_LEARN_DEFAULT_PAY("EasyLearnDefaultPay",0),

    /**
     * 放心学月付
     */
    EASY_LEARN_MONTH_PAY("EasyLearnMonthPay",1),

    /**
     * 微信支付
     */
    WX_PAY("WxPay",2),

    /**
     * 数币支付
     */
    DIGITAL_CURRENCY("DigitalCurrency",3),

    /**
     * 团购
     */
    GROUP_BOOKING("GROUP_BOOKING",4),

    /**
     * 预付
     */
    PREPAYMENT("Prepayment",5),

    /**
     * 还款
     */
    REPAYMENT("Repayment",6),

    /**
     * 会员
     */
    MEMBER("MEMBER",7);

    EasyLearnPayPayEnum(String name, Integer orderType) {
        this.orderType = orderType;
        this.name = name;
    }

    /**
     * 订单类型
     */
    private Integer orderType;

    private String name;

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

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

    public static EasyLearnPayPayEnum getEasyLearnPayPayEnum(int orderType) {
        for (EasyLearnPayPayEnum c : EasyLearnPayPayEnum.values()) {
            if (c.orderType == orderType) {
                return c;
            }
        }
        return null;
    }
}
