add payment, trust badge, handle race condition, fix booking schema
This commit is contained in:
@@ -213,6 +213,29 @@ Database
|
||||
|
||||
---
|
||||
|
||||
## Phase 3+ (SeTrip saat ini — booking, detail, trust)
|
||||
|
||||
Alur data mengikuti pola yang sama: **UI (`app/`) → server actions (`features/*/actions.ts`) → service (`server/services`) → repository (`server/repositories`)**.
|
||||
|
||||
### Booking & pembayaran manual (`features/booking/`)
|
||||
|
||||
- **Peserta:** tombol *Saya sudah bayar* menulis `TripParticipant.markedPaidAt` (komitmen transfer manual).
|
||||
- **Organizer:** panel *Konfirmasi pembayaran* memanggil service yang mengisi `paymentConfirmedAt`.
|
||||
- Tetap **tanpa payment gateway**; bukti transfer bisa di luar app (WA) sesuai kebutuhan.
|
||||
|
||||
### Detail trip kuat (`Trip` + halaman detail)
|
||||
|
||||
- Field terstruktur: `meetingPoint`, `itinerary`, `whatsIncluded`, `whatsExcluded` (teks bebas / bullet).
|
||||
- Form buat trip: `features/trip/schemas.ts` + `app/create-trip/page.tsx`.
|
||||
|
||||
### Trust & organizer (`server/services/trust.service.ts`)
|
||||
|
||||
- **Verified:** kolom `User.isVerified` (default false; set manual / seed / admin ke depan).
|
||||
- **Trip leader:** heuristik `jumlah trip dibuat ≥ TRIP_LEADER_MIN_TRIPS` (`lib/trust.ts`).
|
||||
- **Jumlah trip dibuat & rating organizer:** dihitung agregat dari DB (rating = rata-rata `TripReview` pada semua trip sang organizer).
|
||||
|
||||
---
|
||||
|
||||
# 🧠 Final Principle
|
||||
|
||||
> Build fast → validate → refactor later
|
||||
|
||||
Reference in New Issue
Block a user