package com.yaoai.ai.providers.model;

import lombok.Data;

@Data
public class VideoTaskResult {

    private String taskId;

    /** queued / running / succeeded / failed */
    private String status;

    /** 生成完成后的视频 URL */
    private String videoUrl;

    private String errorMessage;

    public boolean isCompleted() {
        return "succeeded".equals(status) || "failed".equals(status);
    }

    public boolean isSucceeded() {
        return "succeeded".equals(status);
    }

    public static VideoTaskResult queued(String taskId) {
        VideoTaskResult r = new VideoTaskResult();
        r.setTaskId(taskId);
        r.setStatus("queued");
        return r;
    }
}
