package com.sonic.lion.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;

/**
 * @author: code
 * @date: 2025/05/07
 * @Description: 支付渠道
 * @version: 1.0.0
 */
public enum PayChannel {

    BUFF(0, "Buff"),

    STRIPE(1, "Stripe"),

    IAP(2, "Apple"),

    GOOGLE(3, "Google"),
    ;

    private final int value;

    private final String desc;

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


    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

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