#27 ChatMessage, ChatRoom 엔티티 및 테스트 추가#34
Open
LeeJaeYun7 wants to merge 2 commits into
Open
Conversation
Collaborator
LeeJaeYun7
commented
Oct 25, 2023
- ChatMessage, ChatRoom 엔티티 및 테스트를 추가했습니다
f-lab-moony
requested changes
Oct 26, 2023
Collaborator
f-lab-moony
left a comment
There was a problem hiding this comment.
고생 많으셨습니다 ~
코멘트를 좀 남겨 뒀는데 확인 후 리뷰 재요청 부탁드려요 ~
|
|
||
| @Id | ||
| @GeneratedValue(strategy= GenerationType.IDENTITY) | ||
| Long id; |
Collaborator
There was a problem hiding this comment.
접근지정자를 혹시 안쓰시는 이유가 따로 있을까요 ?
꽤 예전부터 말씀드렸던 것 같은데 계속 발견이 되어서, 단순히 빼먹은건지 아니면 없는게 더 낫다고 생각하시는 이유가 있는건지가 궁금합니다 ~
| @JoinColumn(name="sender_id") | ||
| Member sender; | ||
|
|
||
| String content; |
Collaborator
There was a problem hiding this comment.
없어도 되긴 하지만, 클래스에 @Table 이나 필드에 @Column은 명시적으로 붙여주는게 더 좋다고 생각합니다 ~
| @Entity | ||
| @NoArgsConstructor | ||
| @Getter | ||
| public class ChatRoom { |
Collaborator
There was a problem hiding this comment.
그러고보니 얘랑 ChatMessage는 BaseEntity 안받으시는군요! 안받는 이유가 있을까요 ?
|
|
||
|
|
||
| @Builder | ||
| public ChatRoom(Member sender, Member receiver){ |
Collaborator
There was a problem hiding this comment.
채팅방으로 보낸사람 받는사람을 묶고, 메세지에서 내용을 다루는 방식이군요 ~
궁금한게, 같은 채팅방에 A유저랑 B유저가 있을 때 A가 보낸 메세지, B가 보낸 메세지가 있을텐데 그럴경우 sender와 receiver는 어떻게 들어가나요 ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.