refactor(manga): merge ChapterRepositoryInterface into MangaRepositoryInterface + pagesDirectory
- Supprime ChapterRepositoryInterface du domaine Manga (et ses implémentations LegacyChapterRepository et InMemoryChapterRepository) - Déplace toutes les méthodes chapter vers MangaRepositoryInterface avec nommage explicite (findChapterById, findVisibleChapterById, updateChapter, deleteChapter, etc.) - Remplace cbzPath par pagesDirectory + pageCount dans le modèle Chapter (transition : toChapterDomain conserve un fallback cbzPath pour les données existantes, updateChapter synchronise les deux colonnes jusqu'à la Phase 4) - Ajoute la migration Doctrine (pages_directory, page_count sur la table chapter) - Met à jour tous les handlers, listeners, query handlers et state providers du domaine Manga pour injecter uniquement MangaRepositoryInterface - Adapte les tests unitaires et InMemoryMangaRepository avec les nouvelles méthodes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
dae215dd3d
commit
c50f1638ee
@@ -39,6 +39,12 @@ class Chapter
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $cbzPath = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $pagesDirectory = null;
|
||||
|
||||
#[ORM\Column(options: ['default' => 0])]
|
||||
private int $pageCount = 0;
|
||||
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => true])]
|
||||
private ?bool $visible = true;
|
||||
|
||||
@@ -146,4 +152,28 @@ class Chapter
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPagesDirectory(): ?string
|
||||
{
|
||||
return $this->pagesDirectory;
|
||||
}
|
||||
|
||||
public function setPagesDirectory(?string $pagesDirectory): static
|
||||
{
|
||||
$this->pagesDirectory = $pagesDirectory;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPageCount(): int
|
||||
{
|
||||
return $this->pageCount;
|
||||
}
|
||||
|
||||
public function setPageCount(int $pageCount): static
|
||||
{
|
||||
$this->pageCount = $pageCount;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user