package com.sonic.lion.enums;

/**
 * @author: code
 * @date: 2025/06/01
 * @Description: 三方账户类型，对应t_pay_account_fund_third app_type字段
 * @version: 1.0.0
 */
public enum ThirdAccountType {

    /**
     * 绑定类型
     */
    GOOGLE(1, "GOOGLE"),
    APPLE(2, "APPLE"),
    /**
     * stripe 充值
     */
    STRIPE_PAYMENT(3, "STRIPE_PAYMENT"),
    /**
     * stripe 提现
     */
    STRIPE_PAYOUT(4, "STRIPE_PAYOUT"),

    ;

    private final int value;
    private final String desc;

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

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static ThirdAccountType getWithdrawAccount(PayChannel payChannel) {
        if (payChannel == PayChannel.STRIPE) {
            return STRIPE_PAYOUT;
        }
        return null;
    }
}
