Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api-v0.1.5-3 #373

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
}