IAM, package, luggage, app health, rate limit, and more

This commit is contained in:
Stephanos A
2026-06-24 14:02:51 +03:00
parent e10b013b62
commit 86760933e8
63 changed files with 3475 additions and 280 deletions

View File

@@ -262,6 +262,8 @@ model User {
sessions Session[]
passenger Passenger?
@@schema("passenger")
}
@@ -286,14 +288,14 @@ model Passenger {
preferredLanguage String?
blockedUntil DateTime?
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id])
user User? @relation(fields: [userId], references: [id])
bookings Booking[]
loyalty LoyaltyAccount?
wallet WalletAccount?
notifications Notification[]
travelerProfiles TravelerProfile[]
savedRoutes SavedRoute[]
packageBookings PackageBooking[]
packageBookings PackageBooking[]
@@index([userId])
@@index([iamUserId])
@@schema("passenger")
@@ -546,6 +548,7 @@ model Booking {
modifications BookingModification[]
cancellation BookingCancellation?
baggage BaggageBooking[]
excessBaggageCharges ExcessBaggageCharge[]
journey Journey?
@@index([passengerId, status])
@@ -1188,6 +1191,31 @@ model BaggageBooking {
@@schema("passenger")
}
model ExcessBaggageCharge {
id String @id @default(uuid())
bookingId String
agentId String
excessWeightKg Int
feePerKgMinor Int
totalMinor Int
currency String @default("ETB")
status String @default("PENDING") // PENDING | PAID | EXPIRED | WAIVED | CASH_COLLECTED
paymentToken String @unique @default(uuid())
expiresAt DateTime
paidAt DateTime?
waivedBy String?
waivedReason String?
contactPhone String?
contactEmail String?
createdAt DateTime @default(now())
booking Booking @relation(fields: [bookingId], references: [id])
@@index([bookingId])
@@index([paymentToken])
@@index([status])
@@schema("passenger")
}
model AuditLog {
id String @id @default(uuid())
iamUserId String?