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 RepositorySyncStatusDTO extends BaseDTO {
    
    @Schema(description = "外部系统ID")
    private Long externalSystemId;
    
    @Schema(description = "外部系统名称")
    private String externalSystemName;
    
    @Schema(description = "同步开始时间")
    private LocalDateTime startTime;
    
    @Schema(description = "同步结束时间")
    private LocalDateTime endTime;
    
    @Schema(description = "同步状态：PENDING-等待中，RUNNING-运行中，SUCCESS-成功，FAILED-失败")
    private String status;
    
    @Schema(description = "错误信息")
    private String errorMessage;
    
    @Schema(description = "同步的组数量")
    private Integer groupCount;
    
    @Schema(description = "同步的项目数量")
    private Integer projectCount;
    
    @Schema(description = "同步的分支数量")
    private Integer branchCount;
    
    @Schema(description = "同步耗时（秒）")
    private Long durationSeconds;
    
    @Schema(description = "同步详细日志")
    private String syncLog;
} 