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

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 交车任务状态枚举
 */
@Getter
@AllArgsConstructor
public enum DeliveryTaskStatusEnum {

    ACTIVE(0, "激活"),
    SUSPENDED(1, "挂起");

    private final Integer status;
    private final String name;

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

}
