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

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author wjh
 * 2024/8/21
 */
@Getter
@AllArgsConstructor
public enum BonusArrivalType {

    PLATFORM("PLATFORM", "平台"),
    AGENT("AGENT", "代理商"),
    MCH("MCH", "运营商"),
    JOIN("JOIN", "加盟商"),
    PARTNER("PARTNER", "合伙人");

    private final String type;
    private final String msg;

    public static List<String> asList(BonusArrivalType ...types) {
        return Arrays.stream(types).map(BonusArrivalType::getType).collect(Collectors.toList());
    }

    /**
     * 用户表
     */
    public static List<String> userList() {
        return asList(AGENT, MCH, JOIN, PARTNER);
    }

    /**
     * 平台表
     */
    public static List<String> platformList() {
        return asList(PLATFORM);
    }
}
