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

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

import java.util.List;

@Getter
@AllArgsConstructor
public enum RefundStatus {


    REFUNDING("REFUNDING", "退款中"),
    SUCCESS("SUCCESS", "退款成功"),
    FAILED("FAILED", "退款失败");

    private final String status;
    private final String desc;

    public static List<String> asList(RefundStatus ...statuses) {
        return CollectionUtils.map( RefundStatus::getStatus, statuses);
    }

    // 退款成功
    public static List<String> successList() {
        return asList(SUCCESS, REFUNDING);
    }


}
