add booking and payment schema
This commit is contained in:
@@ -59,3 +59,19 @@ export type TripImage = Prisma.TripImageModel
|
||||
*
|
||||
*/
|
||||
export type TripParticipant = Prisma.TripParticipantModel
|
||||
/**
|
||||
* Model Booking
|
||||
* Booking 1-1 ke TripParticipant. Lifecycle ikut peserta:
|
||||
* - join → Booking PENDING (menunggu approve organizer)
|
||||
* - organizer confirm → AWAITING_PAY (paid trip) atau PAID (free trip)
|
||||
* - peserta + organizer rampungkan pembayaran → PAID
|
||||
* - cancel/reject → CANCELLED
|
||||
* `amount` adalah snapshot harga saat booking dibuat — protect dari perubahan trip.price.
|
||||
*/
|
||||
export type Booking = Prisma.BookingModel
|
||||
/**
|
||||
* Model Payment
|
||||
* Satu attempt pembayaran. Satu Booking bisa punya banyak Payment kalau retry
|
||||
* (di Phase MIDTRANS nanti). Untuk MANUAL biasanya cukup 1 Payment.
|
||||
*/
|
||||
export type Payment = Prisma.PaymentModel
|
||||
|
||||
Reference in New Issue
Block a user