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

import java.util.List;

import com.ruoyi.common.utils.collection.CollectionUtils;

import lombok.AllArgsConstructor;
import lombok.Getter;

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

    INVALID("INVALID", "未出账"),
    VALID("VALID", "已出账"),
    WAIT_DIVIDE("WAIT_DIVIDE", "待分成"),
    DIVIDEND("DIVIDEND", "已分成");

    private final String status;
    private final String msg;

    // 有效分成
    public static List<String> valid() {
        return CollectionUtils.map(BonusStatus::getStatus, VALID, WAIT_DIVIDE, DIVIDEND);
    }

    // 结算分成
    public static List<String> settle() {
        return CollectionUtils.map(BonusStatus::getStatus, WAIT_DIVIDE, DIVIDEND);
    }

    // 允许打款的分成状态
    public static List<String> canPay() {
        return CollectionUtils.map(BonusStatus::getStatus, VALID, WAIT_DIVIDE);
    }

}
