-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release v1.0.0
- Loading branch information
Showing
59 changed files
with
2,356 additions
and
406 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lombok.addLombokGeneratedAnnotation = true |
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
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
43 changes: 21 additions & 22 deletions
43
src/main/java/com/example/purebasketbe/domain/cart/dto/CartResponseDto.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 |
---|---|---|
@@ -1,42 +1,41 @@ | ||
package com.example.purebasketbe.domain.cart.dto; | ||
|
||
import com.example.purebasketbe.domain.cart.entity.Cart; | ||
import com.example.purebasketbe.domain.product.entity.Image; | ||
import com.example.purebasketbe.domain.product.entity.Event; | ||
import com.example.purebasketbe.domain.product.entity.Product; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class CartResponseDto { | ||
public record CartResponseDto( | ||
Long id, | ||
String name, | ||
Integer price, | ||
String category, | ||
String imageUrl, | ||
int amount, | ||
|
||
private Long id; | ||
private String name; | ||
private Integer price; | ||
private String category; | ||
private String imageUrl; | ||
private int amount; | ||
Event event, | ||
|
||
int discountRate | ||
|
||
) { | ||
@Builder | ||
private CartResponseDto(Long id, String name, Integer price, String category, String imageUrl, int amount) { | ||
this.id = id; | ||
this.name = name; | ||
this.price = price; | ||
this.category = category; | ||
this.imageUrl = imageUrl; | ||
this.amount = amount; | ||
public CartResponseDto { | ||
|
||
} | ||
|
||
public static CartResponseDto of(Product product, Image image, Cart cart){ | ||
|
||
public static CartResponseDto from( Cart cart) { | ||
Product product = cart.getProduct(); | ||
return CartResponseDto.builder() | ||
.id(product.getId()) | ||
.name(product.getName()) | ||
.price(product.getPrice()) | ||
.category(product.getCategory()) | ||
.imageUrl(image.getImgUrl()) | ||
.imageUrl(product.getImages().get(0).getImgUrl()) | ||
.event(product.getEvent()) | ||
.discountRate(product.getDiscountRate()) | ||
.amount(cart.getAmount()) | ||
.build(); | ||
} | ||
|
||
} |
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
1 change: 0 additions & 1 deletion
1
src/main/java/com/example/purebasketbe/domain/member/MemberRepository.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
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
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
Oops, something went wrong.