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

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

import java.util.List;

/**
 * @author wjh
 * 2024/7/9
 */
@Getter
@AllArgsConstructor
public enum RefundStatus {

    REFUNDING("1", "退款中"),
    REFUND_SUCCESS("2", "退款成功"),
    REFUND_FAIL("3", "退款失败");

    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(REFUND_SUCCESS, REFUNDING);
    }

}
