2023-01-02 16:29:05 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Contracts;
|
|
|
|
|
2023-01-15 15:49:33 +00:00
|
|
|
use App\Repositories\DocumentRepository;
|
|
|
|
|
2023-01-02 16:29:05 +00:00
|
|
|
interface UnitOfWork
|
|
|
|
{
|
|
|
|
public function anime(): AnimeRepository;
|
|
|
|
|
|
|
|
public function manga(): MangaRepository;
|
|
|
|
|
|
|
|
public function characters(): CharacterRepository;
|
|
|
|
|
|
|
|
public function people(): PeopleRepository;
|
|
|
|
|
|
|
|
public function clubs(): ClubRepository;
|
|
|
|
|
|
|
|
public function producers(): ProducerRepository;
|
|
|
|
|
|
|
|
public function magazines(): MagazineRepository;
|
|
|
|
|
|
|
|
public function users(): UserRepository;
|
|
|
|
|
|
|
|
public function animeGenres(): GenreRepository;
|
|
|
|
|
|
|
|
public function mangaGenres(): GenreRepository;
|
2023-01-15 15:49:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the repository instance for a document collection which doesn't have a model representation.
|
|
|
|
* @param string $tableName
|
|
|
|
* @return DocumentRepository
|
|
|
|
*/
|
|
|
|
public function documents(string $tableName): DocumentRepository;
|
2023-01-02 16:29:05 +00:00
|
|
|
}
|