mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
IAM, package, luggage, app health, rate limit, and more
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user