package com.usky.issue.service.vo;

import lombok.Data;

/**
 * 同步执行结果
 *
 * @author fyc
 * @date 2026-06-08
 */
@Data
public class SyncResult {

    private int totalCount;
    private int successCount;
    private int failureCount;
    private String errorMessage;

    public static SyncResult empty() {
        return new SyncResult();
    }

    public void merge(SyncResult other) {
        if (other == null) {
            return;
        }
        this.totalCount += other.totalCount;
        this.successCount += other.successCount;
        this.failureCount += other.failureCount;
        if (other.errorMessage != null) {
            this.errorMessage = other.errorMessage;
        }
    }
}
