<?php

namespace App\Domain\Scraping\Domain\Model;

readonly class ScrapingProgress
{
    public function __construct(
        private int $pagesScraped,
        private int $totalPages
    ) {
    }

    public function getPercentage(): float
    {
        if ($this->totalPages === 0) {
            return 0;
        }
        return ($this->pagesScraped / $this->totalPages) * 100;
    }
}
