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

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 交车状态枚举
 */
@Getter
@AllArgsConstructor
public enum DeliveryStatusEnum {

    NOT_DELIVERED(0, "未交车"),
    DELIVERED(1, "已交车");

    private final Integer status;
    private final String name;

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

}
