Skip to content
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

[feat #142] 채팅 요청 API를 채팅방 API로부터 분리 #143

Merged
merged 44 commits into from
Nov 16, 2024

Conversation

hyun2371
Copy link
Member

@hyun2371 hyun2371 commented Nov 15, 2024

관련 이슈

📑 작업 상세 내용

  • chatInquiry 엔티티 생성
    • chatRoom에 있던 상태 필드, 요청 메시지 저장
  • 디렉토리 변경 chat-> chatroom
  • 디렉토리 추가 chat_inquiry
    • 기존 채팅 수락/거절 API 이동
    • 채팅 상태 변경 스케줄러 이동
  • 기존 채팅방 생성 API 삭제
    • 채팅 수락 시 채팅방 생성됨
  • 이전 pr 코드 리뷰 반영

💫 작업 요약

  • chatInquiry 엔티티 추가해 chatRoom에 있던 요청 관련 로직들 옮김

🔍 중점적으로 리뷰 할 부분

  • 디렉토리 및 변수 네이밍

@hyun2371 hyun2371 added the ✨ feat 기능 추가 label Nov 15, 2024
@hyun2371 hyun2371 self-assigned this Nov 15, 2024
@hyun2371 hyun2371 linked an issue Nov 15, 2024 that may be closed by this pull request
2 tasks
Copy link

github-actions bot commented Nov 15, 2024

Code Coverage

Overall Project 85.11% -1.43% 🍏
Files changed 90.99% 🍏

File Coverage
ChatMessageQueryRepository.java 100% 🍏
ChatRoomController.java 100% 🍏
ChatInquiryController.java 100% 🍏
ChatMessage.java 100% 🍏
ChatRoom.java 100% 🍏
ChatRoomService.java 96.21% -3.79% 🍏
ChatRoomQueryRepositoryImpl.java 95.2% -4.8% 🍏
Member.java 93.88% 🍏
ChatInquiryService.java 89.69% -10.31% 🍏
ChatInquiry.java 84.13% 🍏
ChatInquiryQueryRepositoryImpl.java 82.95% -17.05% 🍏
InquiryStatus.java 50% 🍏
MessageType.java 50% 🍏
ChatMessageService.java 10.81% 🍏
ChatInquiryScheduler.java 0% -75%
ChatMessageController.java 0% 🍏

Copy link

github-actions bot commented Nov 15, 2024

Test Results

 28 files   28 suites   14s ⏱️
128 tests 128 ✅ 0 💤 0 ❌
129 runs  129 ✅ 0 💤 0 ❌

Results for commit a6371c5.

♻️ This comment has been updated with latest results.

@hyun2371 hyun2371 requested a review from dudxo November 15, 2024 14:19
Copy link
Collaborator

@dudxo dudxo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다. 새벽 시간이 늦어서 리뷰를 하지 못해 선 승인하고 금일 내로 코드리뷰 진행하겠습니다.

@hyun2371 hyun2371 merged commit 069b86d into dev Nov 16, 2024
3 checks passed
@hyun2371 hyun2371 deleted the feat/#142/chat-inquiry-api branch November 16, 2024 08:05
Copy link
Collaborator

@dudxo dudxo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chat-> chatInquiry, ChaMessage의 디렉토리를 caht으로 변경하신 이유가 무엇인가요?
chatInquiry와 chatRoom은 무엇이 다른지 잘 모르겠네요..!

private Member getChatPartner(Member member, ChatRoom chatRoom) {
if (member.isEqualMember(chatRoom.getAnswerer().getId())) {
return chatRoom.getInquirer();
} else if (member.isEqualMember(chatRoom.getInquirer().getId())) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else-if절을 지양하는게 좋을 것 같아요!

@@ -133,6 +133,10 @@ public void updateProfile(String nickname, JobGroup jobGroup, JobCategory jobCat
this.jobCategory = jobCategory;
}

public boolean isEqualMember(Long id) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eqluas를 재정의해서 쓰는 것도 좋아보여요!
equals와 JAP 영속성 관련해서 제가 어제 포스팅 하나 했는데 한 번 읽어보시면 좋을 것 같습니다!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵! 다음 PR에 수정해서 반영하겠습니다~

@hyun2371
Copy link
Member Author

chatInquiry와 chatRoom은 무엇이 다른지 잘 모르겠네요..!

chatInquiry는 거절|수락|요청 등의 상태 정보와 요청 메시지를 갖고 있습니다..!
chatInquiry는 채팅 요청이고, chatRoom은 요청 수락 시 생성되는 채팅방을 저장한다고 보면 될 것 같아요

Chat-> chatInquiry, ChaMessage의 디렉토리를 caht으로 변경하신 이유가 무엇인가요?

정확히는 디렉토리를 chatroom과 chat_inquiry로 분류했습니다. 두 엔티티의 역할이 다르다고 생각해서 분리하였습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feat 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ 채팅 요청 API를 채팅방 API로부터 분리
2 participants