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

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 备车状态枚举
 */
@Getter
@AllArgsConstructor
public enum VehiclePrepareStatusEnum {

    DRAFT(0, "待提交"),
    COMPLETED(1, "已完成");

    private final Integer status;
    private final String name;

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

}
