mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-05 04:05:07 +02:00
28 lines
588 B
PHP
28 lines
588 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Contracts\Repositories;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Collection;
|
|
|
|
/**
|
|
* @template TModel of \App\Models\BaseModel
|
|
*/
|
|
interface RepositoryInterface
|
|
{
|
|
/**
|
|
* @param string[] $columns
|
|
*/
|
|
public function get(array $columns = ['*']): Collection;
|
|
|
|
public function save(Model $model): bool;
|
|
|
|
public function delete(Model $model): bool;
|
|
|
|
public function update(Model $model, array $attributes): bool;
|
|
|
|
public function handleFilter(string $filter, mixed $value = null): void;
|
|
}
|