FEAT : 채팅 미리보기 반환#79
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Immmii
left a comment
There was a problem hiding this comment.
리뷰 늦어져서 죄송합니다...
수고 하셨습니다~~!
코멘트 조금 남겨두었습니다.
수정하시고 바로 머지하시면 됩니다
| @JsonFormat( | ||
| shape = JsonFormat.Shape.STRING, | ||
| pattern = "yyyy-MM-dd'T'HH:mm:ss", | ||
| timezone = "Asia/Seoul") | ||
| LocalDateTime joinedAt, |
There was a problem hiding this comment.
'이 방과 함께한지 N일이 지났어요' 형식이라,
백엔드 측에서 joinedAt을 기준으로 조회 시 며칠이 경과되었는지 계산해서 N일로 내려보내주는게 좋을 것 같아요!
| public void updateLastChatTime(Long roomId, LocalDateTime now) { | ||
| topicRoomRepository.updateLastChatTime(roomId, now); | ||
| } |
There was a problem hiding this comment.
이거 이제 미사용하지 않나요?
관련 조회 쿼리와 함께 삭제해도 될 것 같습니다!
| } | ||
|
|
||
| private static String formatTimeAgo(LocalDateTime time) { | ||
| if (time == null) return "대화 없음"; |
There was a problem hiding this comment.
TopicRoom 생성자에서
lastChatTime을 now()로 초기화해서 넣어서, time == null일 경우가 없긴 합니다
TopicRoom 생성자에서 lastChatTime = now() -> lastChatTime = null로 수정하시면 이거 용도에 맞게 쓸 수 있을것 같아용
💡 PR 작업 내용
📋 세부 작업 내용
📸 작업 화면 (스크린샷)
💬 리뷰 요구사항(선택)
⭐ 관련 이슈 번호 [#이슈번호]
🖇️ 기타
TopicRoom에 최신 채팅 미리보기용 컬럼이 추가되어 DB 변경이 필요합니다.ddl-auto: update로 설정되어 있어 별도로 DB 변경을 도입하지 않았으며, 배포 이후 반영될 예정입니다.last_messagelast_message_typelast_message_sender_idSlice에서ChatHistoryResponseDto로 변경되었습니다.joinedAt은topic_room_user.created_at기준입니다.