2018-08-29 13:15:11 +07:00
|
|
|
<?php
|
|
|
|
|
2024-02-24 01:36:02 +07:00
|
|
|
namespace App\Repositories\Contracts;
|
2018-08-29 13:15:11 +07:00
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2022-07-27 17:32:36 +02:00
|
|
|
use Illuminate\Support\Collection;
|
2018-08-29 13:15:11 +07:00
|
|
|
|
|
|
|
interface RepositoryInterface
|
|
|
|
{
|
2024-01-01 21:38:41 +01:00
|
|
|
public function getOne($id): Model;
|
|
|
|
|
|
|
|
public function findOne($id): ?Model;
|
2018-08-29 13:15:11 +07:00
|
|
|
|
2024-04-18 13:27:07 +02:00
|
|
|
/** @return Collection<Model> */
|
2024-01-01 21:38:41 +01:00
|
|
|
public function getMany(array $ids, bool $inThatOrder = false): Collection;
|
2018-08-29 13:15:11 +07:00
|
|
|
|
2024-04-18 13:27:07 +02:00
|
|
|
/** @return Collection<Model> */
|
2018-08-29 13:15:11 +07:00
|
|
|
public function getAll(): Collection;
|
|
|
|
}
|