Skip to content
Merged
Show file tree
Hide file tree
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,20 +4,35 @@

import com.nowait.domaincorerdb.reservation.entity.Reservation;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;


@Getter
@AllArgsConstructor
@Builder
@Schema(description = "대기 사용자 응답 DTO")
public class WaitingUserResponse {
private String id; // userId

@Schema(description = "유저 ID", example = "1201")
private String id; // userId

@Schema(description = "파티 인원", example = "3")
private Integer partySize;

@Schema(description = "사용자 이름(닉네임)", example = "혜민이")
private String userName;

@Schema(description = "대기 등록 시각", example = "2025-07-22T16:00:00")
private LocalDateTime createdAt;

@Schema(description = "대기 상태", example = "CALLING")
private String status;
private Double score; // (필요시, 대기열 정렬 등)

@Schema(description = "대기 순번/점수", example = "2.0")
private Double score;

public static WaitingUserResponse fromEntity(Reservation reservation) {
return WaitingUserResponse.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public List<WaitingUserResponse> getCompletedWaitingUserDetails(Long storeId) {
.toList();
}


// 대기 객체 호출 (WAITING -> CALLING)
@Transactional
public CallingWaitingResponseDto callWaiting(Long storeId, String userId, MemberDetails memberDetails) {
User user = userRepository.findById(memberDetails.getId()).orElseThrow(UserNotFoundException::new);
Expand Down Expand Up @@ -163,6 +163,7 @@ public CallingWaitingResponseDto callWaiting(Long storeId, String userId, Member
.calledAt(reservation.getRequestedAt())
.build();
}
// 대기 객체 상태 변경
@Transactional
public String processEntryStatus(Long storeId, String userId, MemberDetails memberDetails, ReservationStatus status) {
// (권한 체크 필요시 여기에 추가)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public class OrderResponseDto {
private OrderStatus status;
private LocalDateTime createdAt;
private List<OrderMenuDto> items;
private Integer totalPrice;
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public List<OrderResponseDto> getOrderItemsGroupByOrderId(
.map(OrderMenuDto::fromEntity)
.toList()
)
.totalPrice(order.getTotalPrice())
.build())
.toList();
}
Expand Down