-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
리뷰 삭제, 수정, 생성 리팩터링
- Loading branch information
Showing
5 changed files
with
119 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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
4 changes: 4 additions & 0 deletions
4
src/main/java/com/mpnp/baechelin/review/repository/ReviewImageRepository.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
package com.mpnp.baechelin.review.repository; | ||
|
||
import com.mpnp.baechelin.review.domain.Review; | ||
import com.mpnp.baechelin.review.domain.ReviewImage; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface ReviewImageRepository extends JpaRepository<ReviewImage, Integer> { | ||
void deleteAllByReviewId(Review review); | ||
|
||
void deleteByReviewId(Review review); | ||
} |
This file contains 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
This file contains 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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/mpnp/baechelin/tag/repository/TagRepository.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
package com.mpnp.baechelin.tag.repository; | ||
|
||
import com.mpnp.baechelin.review.domain.Review; | ||
import com.mpnp.baechelin.tag.domain.Tag; | ||
import com.mpnp.baechelin.user.domain.User; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface TagRepository extends JpaRepository<Tag, Integer> { | ||
void deleteAllByReviewId(Review review); | ||
|
||
List<Tag> findAllByReviewId(Review review); | ||
|
||
void deleteAByReviewId(Review review); | ||
} |