-
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
4 changed files
with
46 additions
and
0 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
23 changes: 23 additions & 0 deletions
23
src/main/java/com/example/repick/domain/product/dto/productOrder/GetProductOrderForUser.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,23 @@ | ||
package com.example.repick.domain.product.dto.productOrder; | ||
|
||
import com.example.repick.domain.product.entity.Product; | ||
import com.example.repick.domain.product.entity.ProductOrder; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
public record GetProductOrderForUser( | ||
@Schema(description = "์ฃผ๋ฌธ ์์ด๋") long productOrderId, | ||
@Schema(description = "๋ธ๋๋ ์ด๋ฆ") String brandName, | ||
@Schema(description = "์ํ ์ด๋ฆ") String productName, | ||
@Schema(description = "์ํ ์ด๋ฏธ์ง URL") String productImageUrl, | ||
@Schema(description = "๊ตฌ๋งคํ์ ์ฌ๋ถ") Boolean isConfirmed | ||
) { | ||
public static GetProductOrderForUser from(ProductOrder productOrder, Product product) { | ||
return new GetProductOrderForUser( | ||
productOrder.getId(), | ||
product.getBrandName(), | ||
product.getProductName(), | ||
product.getThumbnailImageUrl(), | ||
productOrder.isConfirmed() | ||
); | ||
} | ||
} |
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