package com.sonic.lion.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;

/**
 * @author: code
 * @date: 2025/06/23
 * @Description: 支付方式
 * @version: 1.0.0
 */
public enum PaymentType {


    /**
     * 三方支付渠道支付
     */
    CHANNEL(1, "CHANNEL"),
    /**
     * Buff balance
     */
    BALANCE(0, "E-Pal Buff"),

    ;

    private final int value;

    private final String desc;

    PaymentType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static PaymentType get(int value) {
        for (PaymentType paymentType : values()) {
            if (paymentType.getValue() == value) {
                return paymentType;
            }
        }
        return null;
    }
}
