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

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

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

    PENDING(0, "待完成"),
    COMPLETED(1, "已完成");

    private final Integer status;
    private final String name;

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

}
