Skip to content

Commit

Permalink
refactor : 장바구니 생성시에도 두둥티켓 관련 응답 추가 (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImNM authored Feb 17, 2023
1 parent fc3a372 commit a76fa3f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import band.gosrock.domain.common.vo.Money;
import band.gosrock.domain.domains.cart.domain.Cart;
import band.gosrock.domain.domains.ticket_item.domain.TicketItem;
import band.gosrock.domain.domains.ticket_item.domain.TicketPayType;
import band.gosrock.domain.domains.ticket_item.domain.TicketType;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
Expand Down Expand Up @@ -36,6 +37,12 @@ public class CartResponse {
@Schema(description = "티켓의 타입. 승인 , 선착순 두가지입니다.")
private final TicketType approveType;

@Schema(description = "티켓의 지불 타입. 두둥티켓, 무료 , 유료 세가지입니다.")
private final TicketPayType ticketPayType;

@Schema(description = "계좌정보", nullable = true)
private final String accountNumber;

public static CartResponse of(
List<CartItemResponse> cartItemResponses, Cart cart, TicketItem item) {
return CartResponse.builder()
Expand All @@ -46,6 +53,8 @@ public static CartResponse of(
.isNeedPayment(cart.isNeedPaid())
.totalQuantity(cart.getTotalQuantity())
.approveType(item.getType())
.ticketPayType(item.getPayType())
.accountNumber(item.getAccountNumber())
.build();
}
}

0 comments on commit a76fa3f

Please sign in to comment.