package org.wcs.constant.enums.http;

import lombok.Getter;

import java.util.List;

/**
 * 仓库系统回调状态枚举
 */
@Getter
public enum StockCallBackStatusEnum {

    START(1, "任务开始"),
    FINISH(2, "任务完成"),
    ERROR(3, "任务错误"),
    CANCEL(4, "任务取消"),
    DOUBLE_IN(5, "重复入库"),
    EMPTY_OUT(6, "空出库");

    private final Integer code;
    private final String message;

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

    /**
     * 任务完结的状态
     * @return 结束状态
     */
    public static List<StockCallBackStatusEnum> completeStatus() {
        return List.of(FINISH, ERROR, CANCEL, DOUBLE_IN, EMPTY_OUT);
    }
}
