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

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 验车状态枚举
 *
 * @author 芋道源码
 */
@Getter
@AllArgsConstructor
public enum InspectionStatusEnum {

    PENDING(0, "待检"),
    IN_PROGRESS(1, "检查中"),
    COMPLETED(2, "已完成");

    /**
     * 状态
     */
    private final Integer status;
    /**
     * 名称
     */
    private final String name;

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

}
