31 lines
822 B
PHP
31 lines
822 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\Comment;
|
|
|
|
use App\Models\Comment;
|
|
use App\Services\PaginableResource;
|
|
use App\Services\QueryRequestModifiers\Comment\CommentFilterDTO;
|
|
use App\Services\QueryRequestModifiers\Comment\CommentOrderDTO;
|
|
|
|
interface CommentServiceInterface
|
|
{
|
|
/**
|
|
* @return PaginableResource<Comment>
|
|
*/
|
|
public function fetchComments(int $remoteId, int $page, ?CommentFilterDTO $filters, ?CommentOrderDTO $orderDef): PaginableResource;
|
|
|
|
/**
|
|
* @param array<string, mixed> $data
|
|
*/
|
|
public function storeComment(array $data, int $postId): ?Comment;
|
|
|
|
/**
|
|
* @param array<string, mixed> $data
|
|
*/
|
|
public function updateComment(array $data, int $remoteId, int $id): ?Comment;
|
|
|
|
public function deleteComment(int $remoteId, int $id): bool;
|
|
}
|