package org.wcs.constant.enums.http;

import lombok.Getter;

import java.util.List;

/**
 * 箱式线任务回传状态枚举
 */
@Getter
public enum ConveyCallBackStatusEnum {
    START(1, "开始"),
    FINISH(2, "完成"),
    ERROR(3, "错误"),
    CANCEL(4, "取消");

    private final Integer code;
    private final String message;

    ConveyCallBackStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 完结的状态
     * @return 状态列表
     */
    public static List<ConveyCallBackStatusEnum> completeStatus() {
        return List.of(FINISH, ERROR, CANCEL);
    }
}
