-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ read comments of recipe #160
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아토 고생 많으셨습니다!!
import net.pengcook.recipe.domain.Recipe; | ||
import net.pengcook.user.domain.User; | ||
|
||
@Entity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어노테이션으로 기본생성자 명시해도 괜찮을 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지금은 다른 생성자가 없어서 알아서 만들어주니까 그냥 뒀는데,
생각해보니 어노테이션 이용해서 접근제한자 설정해도 괜찮겠네요!
수정하겠습니다
String message; | ||
|
||
LocalDateTime createdAt; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
필드에 접근제어자 제거하신 이유가 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 어이없는 실수를...
확인 감사합니다!!!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
깔끔하네요~ 주말인데도 작성하시느라 정말 고생 많았어요!!
import net.pengcook.authentication.domain.UserInfo; | ||
import net.pengcook.comment.domain.Comment; | ||
|
||
public record CommentResponse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
추후에 행위가 다르지만 도메인이 같은 DTO가 생길 수도 있으니 클래스명 변경으로 중복을 미리 방지하는 것은 어떤가요~?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니닷
긍정적으로 검토 해보겠습니다. |
|
레시피의 아이디를 받아 댓글을 조회합니다.
이 때 로그인한 유저의 댓글인지를 확인할 수 있어야 삭제 버튼을 노출시킬 수 있어, mine이라는 필드가 존재합니다.
comment.getUser().getId() == userInfo.getId()
부분은 나중에 UserInfo로 옮기면 좋을 것 같네요!