package com.ai.da.common.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum FluxTaskStatusEnum {

    SUCCESS("Ready"),

    TASK_NOT_FOUND("Task not found"),

    REQUEST_MODERATED("Request Moderated"),

    CONTENT_MODERATED("Content Moderated"),

    ERROR("Error"),

    PENDING_F("Pending");

    private final String name;

    public static FluxTaskStatusEnum fromName(String name) {
        for (FluxTaskStatusEnum status : values()) {
            if (status.name.equalsIgnoreCase(name)) {
                return status;
            }
        }
        // 或者返回默认值
        return TASK_NOT_FOUND;
    }
}
