Skip to content

Commit

Permalink
Feature/product (#18)
Browse files Browse the repository at this point in the history
* feature: 도메인 μ„€μ • 및 μƒν’ˆ 등둝 API

* feature: μƒν’ˆ μ‚­μ œ API

* feature: 이미 μ‚­μ œλœ μƒν’ˆ 검증

* feature: μƒν’ˆ μˆ˜μ • API

* feature: swagger Tag

* feature: 성별 μΆ”κ°€

* feature: μœ μ € μΆ”κ°€

* feature: μ—λŸ¬μ½”λ“œ μΆ”κ°€

* feature: μ˜ˆμΈ‘μ •κ°€ μΆ”κ°€
  • Loading branch information
mushroom1324 committed Mar 14, 2024
1 parent da433a1 commit 4a0af30
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public record PatchProduct (
Long userId,
String productName,
Long price,
Long predictPrice,
Long discountRate,
String brandName,
String description,
Expand All @@ -26,6 +27,7 @@ public Product toProduct(User user) {
.user(user)
.productName(this.productName())
.price(this.price())
.predictPrice(this.predictPrice())
.discountRate(this.discountRate())
.brandName(this.brandName())
.description(this.description())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public record PostProduct (
Long userId,
String productName,
Long price,
Long predictPrice,
Long discountRate,
String brandName,
String description,
Expand All @@ -26,6 +27,7 @@ public Product toProduct(User user) {
.user(user)
.productName(this.productName())
.price(this.price())
.predictPrice(this.predictPrice())
.discountRate(this.discountRate())
.brandName(this.brandName())
.description(this.description())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public record ProductResponse(
Long productId,
String productName,
Long price,
Long predictPrice,
Long discountRate,
String brandName,
String description,
Expand All @@ -17,6 +18,7 @@ public static ProductResponse fromProduct(Product product) {
product.getId(),
product.getProductName(),
product.getPrice(),
product.getPredictPrice(),
product.getDiscountRate(),
product.getBrandName(),
product.getDescription(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public class Product extends BaseEntity {
private User user;
private String productName;
private Long price;
private Long predictPrice; // μ˜ˆμΈ‘μ •κ°€
private Long discountRate;
private String brandName;
private String description;
Expand All @@ -25,10 +26,11 @@ public class Product extends BaseEntity {
private String thumbnailImageUrl;

@Builder
public Product(User user, String productName, Long price, Long discountRate, String brandName, String description, QualityRate qualityRate, String thumbnailImageUrl, Gender gender) {
public Product(User user, String productName, Long price, Long predictPrice, Long discountRate, String brandName, String description, QualityRate qualityRate, String thumbnailImageUrl, Gender gender) {
this.user = user;
this.productName = productName;
this.price = price;
this.predictPrice = predictPrice;
this.discountRate = discountRate;
this.brandName = brandName;
this.description = description;
Expand All @@ -41,6 +43,7 @@ public void update(Product product) {
this.user = product.user;
this.productName = product.productName;
this.price = product.price;
this.predictPrice = product.predictPrice;
this.discountRate = product.discountRate;
this.brandName = product.brandName;
this.description = product.description;
Expand Down

0 comments on commit 4a0af30

Please sign in to comment.