[SEMINAR] 7주차 세미나 #11
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔥Pull requests
👷 과제 구현
구현한 내용에 대해서 설명해주세요
엔티티 설계 (Domain)
Comment 엔티티를 생성하여 Article(N:1) 및 Member(N:1)와 연관 관계를 매핑했습니다.
댓글 내용은 content 필드로 관리하며, 데이터베이스 레벨 및 로직에서 길이 제한을 고려했습니다.
DTO 정의 (Request/Response)
CommentRequest를 통해 댓글 내용(content)을 받아옵니다.
CommentResponse를 통해 댓글 작성자 정보, 내용 등을 반환합니다.
비즈니스 로직 (Service)
작성: 유저와 게시글의 존재 여부를 검증한 후 댓글을 저장합니다. (300자 제한 검증 포함)
조회: 특정 게시글 ID(articleId)를 기반으로 달린 댓글 목록을 조회합니다.
수정/삭제: 댓글 작성자와 요청한 유저가 일치하는지 확인 후 기능을 수행합니다.
구현하며 고민했던 내용을 적어주세요 (사소한 것도 좋아요)