From 4109028740726200fcb8ac8c5d034c4b3cea0e61 Mon Sep 17 00:00:00 2001 From: Kwak Seong Joon Date: Fri, 31 May 2024 17:04:11 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20itemListDTO=20=EC=88=98=EC=A0=95(#14)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../carrotMarket/service/dto/GetAllItemsInfoResponseDTO.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/carrotMarket/src/main/java/org/sopt/carrotMarket/service/dto/GetAllItemsInfoResponseDTO.java b/carrotMarket/src/main/java/org/sopt/carrotMarket/service/dto/GetAllItemsInfoResponseDTO.java index 6c4cdb5..ab8989b 100644 --- a/carrotMarket/src/main/java/org/sopt/carrotMarket/service/dto/GetAllItemsInfoResponseDTO.java +++ b/carrotMarket/src/main/java/org/sopt/carrotMarket/service/dto/GetAllItemsInfoResponseDTO.java @@ -10,6 +10,7 @@ public record GetAllItemsInfoResponseDTO( Long itemId, String title, + String imageUrl, int price, boolean isReceived, String detailInfo, @@ -24,7 +25,7 @@ public record GetAllItemsInfoResponseDTO( //지역별로 받아올 때는, 내가 좋아요를 누른지가 필요하지 않아서 builder를 이용했다. @Builder //빌더패턴 - public GetAllItemsInfoResponseDTO(Long itemId, String title, int price, + public GetAllItemsInfoResponseDTO(Long itemId, String title, String imageUrl,int price, boolean isReceived, String detailInfo, boolean isLikedByMember, int likesCount, String hopeTradeSpot, int textedCount, @@ -32,6 +33,7 @@ public GetAllItemsInfoResponseDTO(Long itemId, String title, int price, ) { this.itemId = itemId; this.title = title; + this.imageUrl = imageUrl; this.price = price; this.isReceived = isReceived; this.detailInfo = detailInfo; @@ -46,6 +48,7 @@ public static GetAllItemsInfoResponseDTO of(Item item, boolean isLiked, String c return GetAllItemsInfoResponseDTO.builder() .itemId(item.getId()) .title(item.getTitle()) + .imageUrl(item.getImageUrl()) .price(item.getPrice()) .isReceived(item.isReceived()) .detailInfo(item.getDetailInfo())