/**
 * Copyright (C) 2018-2022
 * All rights reserved, Designed By www.yixiang.co
 */
package co.yixiang.yshop.module.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;

/**
 * 售后状态枚举
 *
 * @author hupeng
 * @date 2023/6/23
 */
@Getter
@AllArgsConstructor
public enum ReachargeOrderStatusEnum {

    WAIT(0, "待支付"),
    SUCCESS(1, "已支付");

    private Integer value;

    private String name;

    public static ReachargeOrderStatusEnum toType(int value) {
        return Stream.of(ReachargeOrderStatusEnum.values())
                .filter(p -> p.value == value)
                .findAny()
                .orElse(null);
    }


}
