package com.ruoyi.newwxpay.refund;

import com.ruoyi.newwxpay.transfer.TransferStatus;

public enum RefundStatus {
    PROCESSING("退款处理中"),
    SUCCESS("退款成功"),
    ABNORMAL("退款异常"),
    CLOSED("退款失败"),
    ;
    private final String description;

    // 构造函数
    RefundStatus(String description) {
        this.description = description;
    }

    // 获取描述信息
    public String getDescription() {
        return description;
    }

    // 根据状态名称获取枚举值
    public static RefundStatus fromName(String name) {
        for (RefundStatus status : RefundStatus.values()) {
            if (status.name().equals(name)) {
                return status;
            }
        }
        throw new IllegalArgumentException("无效的状态名称: " + name);
    }
}
