package com.ruoyi.ss.transfer.domain.enums;

import com.ruoyi.ss.transfer.interfaces.AfterTransfer;
import com.ruoyi.ss.withdraw.service.impl.WithdrawServiceImpl;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 转账业务类型
 * @author wjh
 * 2024/8/9
 */
@Getter
@AllArgsConstructor
public enum TransferBstType {

    WITHDRAW("1", "提现", WithdrawServiceImpl.class);

    private final String type;
    private final String name;
    private final Class<? extends AfterTransfer> afterTransfer;

    public static TransferBstType parse(String type) {
        for (TransferBstType value : TransferBstType.values()) {
            if (value.getType().equals(type)) {
                return value;
            }
        }
        return null;
    }

}
