package cn.iocoder.yudao.module.asset.enums.returnorder;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 还车单状态枚举
 */
@Getter
@AllArgsConstructor
public enum ReturnOrderStatusEnum {

    PENDING_INSPECTION(0, "待验车"),
    INSPECTION_COMPLETED(1, "验车完成"),
    SETTLED(2, "已结算");

    private final Integer status;
    private final String name;

    public static ReturnOrderStatusEnum valueOf(Integer status) {
        return Arrays.stream(values())
                .filter(item -> item.getStatus().equals(status))
                .findFirst()
                .orElse(null);
    }

}
