forked from codesquad-members-2024/be-airdnb
-
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.
feat: 숙소 Id에 해당하는 이미지들을 리스트로 반환하는 기능 구현 #4
- Loading branch information
1 parent
50662ee
commit 7365d57
Showing
3 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
BE/airdnb/src/main/java/com/team01/airdnb/image/ImageRepository.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,8 +1,11 @@ | ||
package com.team01.airdnb.image; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.stereotype.Repository; | ||
|
||
@Repository | ||
public interface ImageRepository extends JpaRepository<Image, Long> { | ||
Optional<List<Image>> findByAccommodationId(Long accommodationId); | ||
} |
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
7 changes: 6 additions & 1 deletion
7
BE/airdnb/src/main/java/com/team01/airdnb/image/dto/ImageListResponse.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,5 +1,10 @@ | ||
package com.team01.airdnb.image.dto; | ||
|
||
public class ImageListResponse { | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record ImageListResponse( | ||
String imagePath | ||
) { | ||
|
||
} |