Skip to content

Commit

Permalink
[ feat ] Add store phone in product info response dto
Browse files Browse the repository at this point in the history
  • Loading branch information
Minuooooo committed Aug 21, 2023
1 parent b08aaa1 commit 12b37d1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ public class GetProductInfoResponseDto {
private Integer price;
private Integer deliveryFee;
private String contentUrl;
private String phone;

public static GetProductInfoResponseDto from(Product product){
public static GetProductInfoResponseDto from(Product product) {
return GetProductInfoResponseDto.builder()
.id(product.getId())
.name(product.getName())
Expand All @@ -30,6 +31,7 @@ public static GetProductInfoResponseDto from(Product product){
.price(product.getPrice())
.deliveryFee(product.getDeliveryFee())
.contentUrl(product.getContentUrl())
.phone(product.getStore().getPhone())
.build();
}
}

0 comments on commit 12b37d1

Please sign in to comment.