package com.fs.live.enums;


import lombok.Getter;

@Getter
public enum MiniAppNotifyTaskStatusEnum {
    /**
     * 待执行
     */
    WAITING(0),
    /**
     * 执行中
     */
    RUNNING(1),
    /**
     * 执行成功
     */
    SUCCESS(2),
    /**
     * 执行失败
     */
    FAILED(3),
    /**
     * 已取消
     */
    CANCELED(4);

    private final int value;

    MiniAppNotifyTaskStatusEnum(int value) {
        this.value = value;
    }


    public static MiniAppNotifyTaskStatusEnum fromValue(int value) {
        for (MiniAppNotifyTaskStatusEnum status : values()) {
            if (status.getValue() == value) {
                return status;
            }
        }
        throw new IllegalArgumentException("Invalid value: " + value);
    }
}
