package com.jeesharp.business.modules.pay.enums;

/**
 * 支付渠道类型（与 {@code BasicPayOrderData.payType} 对应）。
 *
 * @author jeesharp
 * @since 2026-05-25
 */
public enum PayTypeStyle {

    WX_PAY("微信", "1"),
    ALI_PAY("支付宝", "2"),
    PFA_PAY("浦发", "3"),
    TLINX_PAY("TLinx支付", "4");

    private final String type;
    private final String value;

    PayTypeStyle(String type, String value) {
        this.type = type;
        this.value = value;
    }

    public String getType() {
        return type;
    }

    public String getValue() {
        return value;
    }

    public static PayTypeStyle getByValue(String value) {
        for (PayTypeStyle payTypeStyle : PayTypeStyle.values()) {
            if (payTypeStyle.getValue().equals(value)) {
                return payTypeStyle;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return type;
    }
}
