taktik - laravel
This commit is contained in:
33
app/Services/Post/PostServiceInterface.php
Normal file
33
app/Services/Post/PostServiceInterface.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Services\Post;
|
||||
|
||||
use App\Models\Post;
|
||||
use App\Services\PaginableResource;
|
||||
use App\Services\QueryRequestModifiers\Post\PostFilterDTO;
|
||||
use App\Services\QueryRequestModifiers\Post\PostOrderDTO;
|
||||
|
||||
interface PostServiceInterface
|
||||
{
|
||||
/**
|
||||
* @return PaginableResource<Post>
|
||||
*/
|
||||
public function fetchPosts(int $page, ?PostFilterDTO $filters, ?PostOrderDTO $orderDef): PaginableResource;
|
||||
|
||||
public function findPost(int $id): ?Post;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $data
|
||||
* @return Post
|
||||
*/
|
||||
public function storePost(array $data): Post;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $data
|
||||
*/
|
||||
public function updatePost(array $data, int $id): ?Post;
|
||||
|
||||
public function deletePost(int $id): bool;
|
||||
}
|
||||
Reference in New Issue
Block a user