<?php

namespace App\Domain\Manga\Domain\Contract\Repository;

use App\Domain\Manga\Domain\Model\Chapter;

interface ChapterRepositoryInterface
{
    public function findById(string $id): ?Chapter;
    public function findVisibleById(string $id): ?Chapter;
    public function findByMangaIdAndChapterNumber(string $mangaId, float $chapterNumber): ?Chapter;
    public function save(Chapter $chapter): void;
    public function delete(Chapter $chapter): void;

    /**
     * @return Chapter[]
     */
    public function findByMangaIdAndVolume(string $mangaId, int $volume): array;

    /**
     * @return Chapter[]
     */
    public function findVisibleByMangaIdAndVolume(string $mangaId, int $volume): array;

    /**
     * @return Chapter[]
     */
    public function findVisibleWithCbzByMangaIdAndVolume(string $mangaId, int $volume): array;
}
