package com.sonic.lion.enums;

/**
 * @author: code
 * @date: 2025/05/18
 * @Description: 支付方式
 * @version: 1.0.0
 */
public enum PaymentMethod {

    /**
     * 网页支付
     */
    WEB(1, "网页支付"),
    ;

    private final int value;

    private final String desc;

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

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

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