package com.qqchen.deploy.backend.deploy.service;

import com.qqchen.deploy.backend.deploy.dto.RepositorySyncHistoryDTO;
import com.qqchen.deploy.backend.deploy.entity.RepositorySyncHistory;
import com.qqchen.deploy.backend.deploy.enums.ExternalSystemSyncStatus;
import com.qqchen.deploy.backend.deploy.enums.RepositorySyncType;
import com.qqchen.deploy.backend.deploy.query.RepositorySyncHistoryQuery;
import com.qqchen.deploy.backend.framework.service.IBaseService;

/**
 * Git同步历史记录 Service
 */
public interface IRepositorySyncHistoryService extends IBaseService<RepositorySyncHistory, RepositorySyncHistoryDTO, RepositorySyncHistoryQuery, Long> {

    /**
     * 创建同步历史记录
     *
     * @param externalSystemId 外部系统ID
     * @param syncType 同步类型
     * @return 同步历史记录
     */
    RepositorySyncHistoryDTO createSyncHistory(Long externalSystemId, RepositorySyncType syncType);

    /**
     * 更新同步历史记录
     *
     * @param id 同步历史记录ID
     * @param status 同步状态
     * @param errorMessage 错误信息
     */
    void updateSyncHistory(Long id, ExternalSystemSyncStatus status, String errorMessage);
} 