package com.qqchen.deploy.backend.system.model.dto;

import com.qqchen.deploy.backend.framework.dto.BaseDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 仓库同步任务DTO
 * 用于展示正在运行的同步任务信息
 *
 * @author QQchen
 * @version 1.0
 */
@Data
@Schema(description = "仓库同步任务DTO")
@EqualsAndHashCode(callSuper = true)
public class RepositorySyncTaskDTO extends BaseDTO {
    
    @Schema(description = "外部系统ID")
    private Long externalSystemId;
    
    @Schema(description = "外部系统名称")
    private String externalSystemName;
    
    @Schema(description = "同步开始时间")
    private LocalDateTime startTime;
    
    @Schema(description = "同步状态：PENDING-等待中，RUNNING-运行中，SUCCESS-成功，FAILED-失败")
    private String status;
    
    @Schema(description = "错误信息")
    private String errorMessage;
    
    @Schema(description = "是否正在运行")
    private Boolean isRunning;
    
    @Schema(description = "已同步的组数量")
    private Integer syncedGroupCount;
    
    @Schema(description = "已同步的项目数量")
    private Integer syncedProjectCount;
    
    @Schema(description = "已同步的分支数量")
    private Integer syncedBranchCount;
    
    @Schema(description = "预计剩余时间（秒）")
    private Long estimatedRemainingSeconds;
} 