From 0d589340d9f9f841f3256682b859d2117daacb4d Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Wed, 6 May 2026 22:13:37 +0300 Subject: [PATCH] add Comment entity, dto, repository interface --- backend/app/Comment/Comment.php | 41 +++++++++++++++++++++++ backend/app/Comment/CommentRepository.php | 17 ++++++++++ backend/app/Comment/CreateCommentDto.php | 15 +++++++++ 3 files changed, 73 insertions(+) create mode 100644 backend/app/Comment/Comment.php create mode 100644 backend/app/Comment/CommentRepository.php create mode 100644 backend/app/Comment/CreateCommentDto.php diff --git a/backend/app/Comment/Comment.php b/backend/app/Comment/Comment.php new file mode 100644 index 0000000..311b6c4 --- /dev/null +++ b/backend/app/Comment/Comment.php @@ -0,0 +1,41 @@ +id; + } + + public function getPostId(): int + { + return $this->postId; + } + + public function getUserId(): int + { + return $this->userId; + } + + public function getBody(): string + { + return $this->body; + } + + public function getCreatedAt(): DateTimeImmutable + { + return $this->createdAt; + } +} diff --git a/backend/app/Comment/CommentRepository.php b/backend/app/Comment/CommentRepository.php new file mode 100644 index 0000000..7248d20 --- /dev/null +++ b/backend/app/Comment/CommentRepository.php @@ -0,0 +1,17 @@ +