<?php

declare(strict_types=1);

namespace App\Business\DataImport;

final readonly class DataImportExecutionResult
{
    /**
     * @param  list<DataImportRowExecutionOutcome>  $rowOutcomes
     */
    public function __construct(
        public array $rowOutcomes,
        public int $importedCount,
        public int $failedCount,
    ) {}

    public function succeeded(): bool
    {
        return $this->failedCount === 0 && $this->importedCount > 0;
    }
}
