Chore: 샘플 데이터 및 Post 엔티티 확장 추가 (#204) #206
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.
📌 개요
DevInitData를 구성했습니다.Post엔티티에 좋아요, 북마크, 댓글 수 카운트 필드를 추가했습니다.🔨 작업 내용
엔티티 수정
Post엔티티에 다음 필드 추가bookmarkCount: 북마크 수commentCount: 댓글 수increase*Count,decrease*Count) 추가Repository 수정
PostCategoryRepositoryfindAllByNameIn(List<String> categoryNames)메서드 추가초기 데이터 추가 (
DevInitData)default프로필일 때만 실행 (ApplicationRunner)PostCategoryRepository) 연동commentCount자동 갱신🔗 관련 이슈
Closes #204
📝 참고 사항
User,Post,Comment,PostCategory데이터가 없는 경우에만 삽입data.sql로 카테고리 선행 생성 필요✅ 체크리스트