#49 #50 #51 #52 #53 - 채팅 채널 메시지 기능 구현 (목록 조회·텍스트/파일 전송·기본 채널 시딩) - #199
Merged
Conversation
- Channel 엔티티 추가 (ChannelType: GENERAL/TEAM/DIRECT) - ChannelRepository(도메인) + ChannelJpaRepository(인프라) 구현 - ChannelService.findAll → ChannelResponse 목록 반환 - GET /api/v1/channels 엔드포인트 추가 - Flyway 마이그레이션 create_channel 추가 (V10은 선점되어 V24 사용) - ChannelService 단위 테스트 및 FakeChannelRepository 추가 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Message 엔티티 추가 (channel/sender FK, content, MessageType, createdAt)
- MessageRepository(페이징) 도메인 + Spring Data/JPA 어댑터 구현
- MessageService.getMessages(channelId, Pageable) → MessageResponse[] (채널 미존재 시 CHANNEL_NOT_FOUND)
- GET /api/v1/channels/{channelId}/messages?page=0&size=50 (최신순 기본 정렬)
- Flyway V25__create_message.sql (channel/sender FK, channel_id+created_at 인덱스)
- ErrorCode CHANNEL_NOT_FOUND 추가, MessageService 단위 테스트 + FakeMessageRepository
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- MessageCreateRequest DTO 추가 (content, type)
- MessageService.sendMessage(channelId, senderId, content, type): sender = 현재 멤버(@AuthenticationPrincipal), type 미지정 시 TEXT
- POST /api/v1/channels/{channelId}/messages (201 Created)
- 채널/멤버 미존재 시 각각 CHANNEL_NOT_FOUND / MEMBER_NOT_FOUND
- 메시지 전송 단위 테스트 추가
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- MessageFile 엔티티 추가, Message에 files(@onetomany, cascade) + addFile 추가 - MessageService.sendFileMessage: MultipartFile 업로드(StorageService 재사용) 후 type=FILE 메시지로 저장 - POST /api/v1/channels/{channelId}/messages (multipart/form-data, content+files) - MessageResponse에 files(MessageFileResponse[]) 포함 - 첨부 파일 없으면 MESSAGE_FILE_REQUIRED - Flyway V26__create_message_file.sql, 파일 메시지 테스트 + FakeStorageService Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ChannelMember 엔티티 + 리포지토리 추가 (channel/member 유니크 제약) - ChannelSeeder(ApplicationRunner): 기동 시 General(GENERAL) + 팀별 4개(DEV/DESIGN/MARKETING/PRODUCT, TEAM) 멱등 생성, 전체 멤버를 General에 참여 - ChannelRepository.findByName 추가 (멱등 시딩용) - Flyway V27__create_channel_member.sql - ChannelSeeder 단위 테스트 + FakeChannelMemberRepository Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
관련 이슈
closes #49 #50 #51 #52 #53
작업 내용
체크리스트
정책 결정
체크리스트
검증