Q1_20250829091849.webp
N

Q1_20250829091849.webp

K
Kizspy.me
。 Validate seats as a non-empty array, where each seat has:
seatNumber: Non-empty string.
■ type: Either adult or child.
■ price: Positive number.
discount: Optional, non-negative number (default to 0 if not
provided).
• Verify the user exists in the users collection.
o Verify the showtime exists in the showtimes collection.
2025
o Check that all requested seatNumbers are available in the showtime's seats
array (status: available).
。 Calculate totalPrice as the sum of (price - discount) for each seat.
o Create a new ticket in the tickets collection with userld, showtimeld,
formatted seats, and totalPrice.
。 Update the showtime's seats array to set the status of requested seats to
booked.
o Return the created ticket in the response.
• Handle errors with appropriate status codes and messages.
ESD
----END---
Zoom
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
SDN302
Thêm bởi
Ngọc Lan1
Ngày thêm
Lượt xem
1,228
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom