taktik-laravel-pohovor/app/Services/Comment/CommentServiceInterface.php

31 lines
822 B
PHP
Raw Permalink Normal View History

2025-01-23 00:19:07 +01:00
<?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;
}