package com.ruoyi.bst.account.domain.enums;

import com.ruoyi.common.utils.collection.CollectionUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.List;

/**
 * @author wjh
 * 2025/4/7
 */
@Getter
@AllArgsConstructor
public enum AccountType {
    WX("WX", "微信"),
    ALI("ALI", "支付宝"),
    BANK("BANK", "线下银行卡"),
    QR("QR", "线下收款二维码");

    private final String code;
    private final String name;

    // 离线列表
    public static List<String> offline() {
        return CollectionUtils.map(AccountType::getCode, BANK, QR);
    }

    // 在线列表
    public static List<String> online() {
        return CollectionUtils.map(AccountType::getCode, WX, ALI);
    }
}
