Skip to content

Commit

Permalink
[Feat] itemListDTO 수정(#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjk4618 committed May 31, 2024
1 parent c048c8c commit 4109028
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
public record GetAllItemsInfoResponseDTO(
Long itemId,
String title,
String imageUrl,
int price,
boolean isReceived,
String detailInfo,
Expand All @@ -24,14 +25,15 @@ 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,
String createdTime
) {
this.itemId = itemId;
this.title = title;
this.imageUrl = imageUrl;
this.price = price;
this.isReceived = isReceived;
this.detailInfo = detailInfo;
Expand All @@ -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())
Expand Down

0 comments on commit 4109028

Please sign in to comment.