namespace PowderCoating.Application.DTOs.QuickBooks;

/// <summary>
/// Result of an import operation from QuickBooks IIF file.
/// </summary>
public class ImportResultDto
{
    public bool Success { get; set; }
    public int TotalRecords { get; set; }
    public int ImportedCount { get; set; }
    public int UpdatedCount { get; set; }
    public int SkippedCount { get; set; }
    /// <summary>
    /// Records that were intentionally not re-imported because they already exist
    /// in the destination (positive outcome — not an error or warning).
    /// Displayed to the user separately from SkippedCount to avoid confusion.
    /// </summary>
    public int AlreadyRecordedCount { get; set; }
    public List<ImportErrorDto> Errors { get; set; } = new();

    public string Summary =>
        $"{ImportedCount} imported, {UpdatedCount} updated, {SkippedCount} skipped out of {TotalRecords} total records.";
}
