-
Notifications
You must be signed in to change notification settings - Fork 0
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
6 changed files
with
39 additions
and
5 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
14 changes: 14 additions & 0 deletions
14
src/main/java/Journey/Together/domain/place/dto/response/PlaceBookmarkDto.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package Journey.Together.domain.place.dto.response; | ||
|
||
import Journey.Together.domain.place.entity.Place; | ||
import Journey.Together.domain.placeBookbark.entity.PlaceBookmark; | ||
|
||
public record PlaceBookmarkDto( | ||
Long placeId, | ||
String placeName | ||
) { | ||
|
||
public static PlaceBookmarkDto of(PlaceBookmark placeBookmark){ | ||
return new PlaceBookmarkDto(placeBookmark.getPlace().getId(), placeBookmark.getPlace().getName()); | ||
} | ||
} |
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
4 changes: 4 additions & 0 deletions
4
src/main/java/Journey/Together/domain/placeBookbark/repository/PlaceBookmarkRepository.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,17 +1,21 @@ | ||
package Journey.Together.domain.placeBookbark.repository; | ||
|
||
|
||
import Journey.Together.domain.member.entity.Member; | ||
import Journey.Together.domain.place.entity.Place; | ||
import Journey.Together.domain.placeBookbark.entity.PlaceBookmark; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public interface PlaceBookmarkRepository extends JpaRepository<PlaceBookmark, Long> { | ||
|
||
List<PlaceBookmark> findAllByPlace(Place place); | ||
|
||
List<PlaceBookmark> findAllByMemberOrderByPlaceNameAsc(Member member); | ||
|
||
|
||
} |
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