add Comment entity, dto, repository interface
This commit is contained in:
parent
015e61caf7
commit
0d589340d9
3 changed files with 73 additions and 0 deletions
17
backend/app/Comment/CommentRepository.php
Normal file
17
backend/app/Comment/CommentRepository.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Comment;
|
||||
|
||||
interface CommentRepository
|
||||
{
|
||||
public function create(CreateCommentDto $dto): Comment;
|
||||
|
||||
public function find(int $id): ?Comment;
|
||||
|
||||
/**
|
||||
* @return Comment[]
|
||||
*/
|
||||
public function findByPostId(int $postId): array;
|
||||
|
||||
public function delete(int $id): void;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue