package com.qqchen.deploy.backend.schedule.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 任务执行状态DTO（用于Redis存储和前端展示）
 * 
 * @author qichen
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "任务执行状态")
public class JobStatusDTO {

    @Schema(description = "任务ID")
    private Long jobId;

    @Schema(description = "任务名称")
    private String jobName;

    @Schema(description = "执行状态：WAITING-等待、RUNNING-运行中、SUCCESS-成功、FAIL-失败、TIMEOUT-超时")
    private String status;

    @Schema(description = "执行进度（0-100）")
    private Integer progress;

    @Schema(description = "当前步骤描述")
    private String currentStep;

    @Schema(description = "详细消息")
    private String message;

    @Schema(description = "开始时间")
    private LocalDateTime startTime;

    @Schema(description = "更新时间（Redis中存储为字符串）")
    private String updateTime;
}

