Feat: 게시글 파일 첨부 및 프로필 이미지 매핑 기능 추가 (#285) #297
Merged
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.
📌 개요
🔨 작업 내용
파일 매핑 구조 개선
AttachmentMapping과FileAttachment간의 양방향 연관관계 수정→
AttachmentMapping이@JoinColumn(name = "attachment_id")을 가지도록 변경→
FileAttachment에서는mappedBy = "fileAttachment"로 관계 정리mappedBy및 컬럼명 혼동 문제 해결Repository 기능 확장
AttachmentMappingRepository에findByEntityTypeAndEntityId()추가FileAttachmentRepository에findByPublicURL()추가AccountService 리팩토링 및 프로필 이미지 관리 로직 추가
updateProfileImage()및deleteProfileImage()메서드 추가FileService를 주입받아 실제 S3 파일 삭제 처리 수행테스트 코드 개선
@MockBean FileService적용으로 S3 외부 호출 방지AccountServiceTest,AccountControllerTest) 추가DTO 및 Controller 일관성 정리
UpdateUserProfileRequest를UserProfileRequest로 통합 및 네이밍 정리🔗 관련 이슈
Closes #285
📝 참고 사항
✅ 체크리스트