Set schema to 'passenger'

This commit is contained in:
Stephanos A
2026-05-22 16:21:24 +03:00
parent 672987cd1e
commit 2dad9137dd

View File

@@ -5,6 +5,7 @@ generator client {
datasource db { datasource db {
provider = "postgresql" provider = "postgresql"
url = env("DATABASE_URL") url = env("DATABASE_URL")
schemas = ["passenger"]
} }
enum UserRole { enum UserRole {
@@ -13,6 +14,8 @@ enum UserRole {
SUPERVISOR SUPERVISOR
ADMIN ADMIN
STAFF STAFF
@@schema("passenger")
} }
enum TripStatus { enum TripStatus {
@@ -22,12 +25,16 @@ enum TripStatus {
ARRIVED ARRIVED
CANCELLED CANCELLED
DELAYED DELAYED
@@schema("passenger")
} }
enum SeatKind { enum SeatKind {
STANDARD STANDARD
PREMIUM PREMIUM
ACCESSIBLE ACCESSIBLE
@@schema("passenger")
} }
enum SeatStatus { enum SeatStatus {
@@ -35,11 +42,15 @@ enum SeatStatus {
HELD HELD
BOOKED BOOKED
BLOCKED BLOCKED
@@schema("passenger")
} }
enum PassengerCategory { enum PassengerCategory {
ADULT ADULT
CHILD CHILD
@@schema("passenger")
} }
enum IdDocumentType { enum IdDocumentType {
@@ -47,12 +58,16 @@ enum IdDocumentType {
PASSPORT PASSPORT
DRIVING_LICENSE DRIVING_LICENSE
OTHER OTHER
@@schema("passenger")
} }
enum Currency { enum Currency {
ETB ETB
DJF DJF
USD USD
@@schema("passenger")
} }
model SeatClass { model SeatClass {
@@ -66,6 +81,8 @@ model SeatClass {
coaches Coach[] coaches Coach[]
fareRules FareRule[] fareRules FareRule[]
routeFareRules RouteFareRule[] routeFareRules RouteFareRule[]
@@schema("passenger")
} }
enum BookingStatus { enum BookingStatus {
@@ -76,6 +93,8 @@ enum BookingStatus {
COMPLETED COMPLETED
NO_SHOW NO_SHOW
REFUNDED REFUNDED
@@schema("passenger")
} }
enum PaymentMethodType { enum PaymentMethodType {
@@ -84,6 +103,8 @@ enum PaymentMethodType {
EBIRR EBIRR
CARD CARD
WALLET WALLET
@@schema("passenger")
} }
enum PaymentIntentStatus { enum PaymentIntentStatus {
@@ -93,11 +114,15 @@ enum PaymentIntentStatus {
FAILED FAILED
CANCELLED CANCELLED
REFUNDED REFUNDED
@@schema("passenger")
} }
enum WalletLedgerType { enum WalletLedgerType {
CREDIT CREDIT
DEBIT DEBIT
@@schema("passenger")
} }
enum NotificationCategory { enum NotificationCategory {
@@ -106,6 +131,8 @@ enum NotificationCategory {
DISRUPTION DISRUPTION
PROMOTION PROMOTION
SYSTEM SYSTEM
@@schema("passenger")
} }
enum StopStatus { enum StopStatus {
@@ -113,18 +140,24 @@ enum StopStatus {
APPROACHING APPROACHING
CURRENT CURRENT
UPCOMING UPCOMING
@@schema("passenger")
} }
enum SupportConversationStatus { enum SupportConversationStatus {
OPEN OPEN
RESOLVED RESOLVED
CLOSED CLOSED
@@schema("passenger")
} }
enum SupportSender { enum SupportSender {
USER USER
BOT BOT
AGENT AGENT
@@schema("passenger")
} }
enum LoyaltyTier { enum LoyaltyTier {
@@ -132,6 +165,8 @@ enum LoyaltyTier {
SILVER SILVER
GOLD GOLD
PLATINUM PLATINUM
@@schema("passenger")
} }
enum LoyaltyLedgerReason { enum LoyaltyLedgerReason {
@@ -140,6 +175,8 @@ enum LoyaltyLedgerReason {
PROMO_BONUS PROMO_BONUS
MANUAL_ADJUSTMENT MANUAL_ADJUSTMENT
EXPIRY EXPIRY
@@schema("passenger")
} }
enum FoodOrderStatus { enum FoodOrderStatus {
@@ -148,12 +185,16 @@ enum FoodOrderStatus {
READY READY
DELIVERED DELIVERED
CANCELLED CANCELLED
@@schema("passenger")
} }
enum DevicePlatform { enum DevicePlatform {
IOS IOS
ANDROID ANDROID
WEB WEB
@@schema("passenger")
} }
model User { model User {
@@ -180,6 +221,8 @@ model User {
preferences UserPreferences? preferences UserPreferences?
auditLogs AuditLog[] auditLogs AuditLog[]
fraudAlerts FraudAlert[] fraudAlerts FraudAlert[]
@@schema("passenger")
} }
model Session { model Session {
@@ -192,6 +235,8 @@ model Session {
lastActivityAt DateTime @default(now()) lastActivityAt DateTime @default(now())
createdAt DateTime @default(now()) createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id], onDelete: Cascade) user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@schema("passenger")
} }
model Passenger { model Passenger {
@@ -208,6 +253,8 @@ model Passenger {
travelerProfiles TravelerProfile[] travelerProfiles TravelerProfile[]
savedRoutes SavedRoute[] savedRoutes SavedRoute[]
@@index([userId]) @@index([userId])
@@schema("passenger")
} }
model TravelerProfile { model TravelerProfile {
@@ -220,6 +267,8 @@ model TravelerProfile {
notes String? notes String?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
passenger Passenger @relation(fields: [passengerId], references: [id]) passenger Passenger @relation(fields: [passengerId], references: [id])
@@schema("passenger")
} }
model Station { model Station {
@@ -237,6 +286,8 @@ model Station {
stopTimes TripStopTime[] stopTimes TripStopTime[]
crowdSignals StationCrowdSignal[] crowdSignals StationCrowdSignal[]
@@index([city, countryCode]) @@index([city, countryCode])
@@schema("passenger")
} }
model Train { model Train {
@@ -250,6 +301,8 @@ model Train {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
schedules TrainSchedule[] schedules TrainSchedule[]
@@schema("passenger")
} }
model TrainSchedule { model TrainSchedule {
@@ -277,6 +330,8 @@ model TrainSchedule {
menuItems MenuItem[] menuItems MenuItem[]
journeySegments JourneySegment[] journeySegments JourneySegment[]
@@index([departureAt, originStationId]) @@index([departureAt, originStationId])
@@schema("passenger")
} }
model TripStopTime { model TripStopTime {
@@ -291,6 +346,8 @@ model TripStopTime {
schedule TrainSchedule @relation(fields: [scheduleId], references: [id]) schedule TrainSchedule @relation(fields: [scheduleId], references: [id])
station Station @relation(fields: [stationId], references: [id]) station Station @relation(fields: [stationId], references: [id])
@@unique([scheduleId, sequence]) @@unique([scheduleId, sequence])
@@schema("passenger")
} }
model TripLiveStatus { model TripLiveStatus {
@@ -304,6 +361,8 @@ model TripLiveStatus {
platformLabel String? platformLabel String?
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
schedule TrainSchedule @relation(fields: [scheduleId], references: [id]) schedule TrainSchedule @relation(fields: [scheduleId], references: [id])
@@schema("passenger")
} }
model Coach { model Coach {
@@ -323,6 +382,8 @@ model Coach {
seatClass SeatClass @relation(fields: [seatClassId], references: [id]) seatClass SeatClass @relation(fields: [seatClassId], references: [id])
seats Seat[] seats Seat[]
assignments CoachAssignment[] assignments CoachAssignment[]
@@schema("passenger")
} }
model CoachAssignment { model CoachAssignment {
@@ -336,6 +397,8 @@ model CoachAssignment {
coach Coach @relation(fields: [coachId], references: [id]) coach Coach @relation(fields: [coachId], references: [id])
@@unique([scheduleId, positionNumber]) @@unique([scheduleId, positionNumber])
@@index([scheduleId]) @@index([scheduleId])
@@schema("passenger")
} }
model Seat { model Seat {
@@ -358,6 +421,8 @@ model Seat {
blocks SeatBlock[] blocks SeatBlock[]
@@unique([coachId, row, col]) @@unique([coachId, row, col])
@@unique([coachId, seatNumber]) @@unique([coachId, seatNumber])
@@schema("passenger")
} }
model SeatHold { model SeatHold {
@@ -370,6 +435,8 @@ model SeatHold {
expiresAt DateTime expiresAt DateTime
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@index([expiresAt]) @@index([expiresAt])
@@schema("passenger")
} }
model FareRule { model FareRule {
@@ -384,6 +451,8 @@ model FareRule {
validFrom DateTime validFrom DateTime
validUntil DateTime? validUntil DateTime?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@schema("passenger")
} }
model Booking { model Booking {
@@ -416,6 +485,8 @@ model Booking {
cancellation BookingCancellation? cancellation BookingCancellation?
baggage BaggageBooking[] baggage BaggageBooking[]
@@index([passengerId, status]) @@index([passengerId, status])
@@schema("passenger")
} }
model BookingSeat { model BookingSeat {
@@ -437,6 +508,8 @@ model BookingSeat {
displayFareMinor Int? displayFareMinor Int?
booking Booking @relation(fields: [bookingId], references: [id]) booking Booking @relation(fields: [bookingId], references: [id])
seat Seat @relation(fields: [seatId], references: [id]) seat Seat @relation(fields: [seatId], references: [id])
@@schema("passenger")
} }
model PaymentMethod { model PaymentMethod {
@@ -449,6 +522,8 @@ model PaymentMethod {
isDefault Boolean @default(false) isDefault Boolean @default(false)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@index([userId, isDefault]) @@index([userId, isDefault])
@@schema("passenger")
} }
model PaymentIntent { model PaymentIntent {
@@ -477,6 +552,8 @@ model PaymentIntent {
refunds PaymentRefund[] refunds PaymentRefund[]
@@index([providerOrderId]) @@index([providerOrderId])
@@index([providerTxnId]) @@index([providerTxnId])
@@schema("passenger")
} }
model PaymentWebhookEvent { model PaymentWebhookEvent {
@@ -493,6 +570,8 @@ model PaymentWebhookEvent {
processingError String? processingError String?
@@unique([provider, externalEventId]) @@unique([provider, externalEventId])
@@index([merchantOrderId]) @@index([merchantOrderId])
@@schema("passenger")
} }
model PaymentRefund { model PaymentRefund {
@@ -504,6 +583,8 @@ model PaymentRefund {
status String status String
createdAt DateTime @default(now()) createdAt DateTime @default(now())
paymentIntent PaymentIntent @relation(fields: [paymentIntentId], references: [id]) paymentIntent PaymentIntent @relation(fields: [paymentIntentId], references: [id])
@@schema("passenger")
} }
model Ticket { model Ticket {
@@ -520,6 +601,8 @@ model Ticket {
validatorId String? validatorId String?
booking Booking @relation(fields: [bookingId], references: [id]) booking Booking @relation(fields: [bookingId], references: [id])
validationLogs GateValidationLog[] validationLogs GateValidationLog[]
@@schema("passenger")
} }
model LoyaltyAccount { model LoyaltyAccount {
@@ -533,6 +616,8 @@ model LoyaltyAccount {
passenger Passenger @relation(fields: [passengerId], references: [id]) passenger Passenger @relation(fields: [passengerId], references: [id])
ledger LoyaltyLedgerEntry[] ledger LoyaltyLedgerEntry[]
rewards LoyaltyReward[] rewards LoyaltyReward[]
@@schema("passenger")
} }
model LoyaltyLedgerEntry { model LoyaltyLedgerEntry {
@@ -544,6 +629,8 @@ model LoyaltyLedgerEntry {
balanceAfter Int balanceAfter Int
createdAt DateTime @default(now()) createdAt DateTime @default(now())
account LoyaltyAccount @relation(fields: [accountId], references: [id]) account LoyaltyAccount @relation(fields: [accountId], references: [id])
@@schema("passenger")
} }
model LoyaltyReward { model LoyaltyReward {
@@ -554,6 +641,8 @@ model LoyaltyReward {
available Boolean @default(true) available Boolean @default(true)
description String? description String?
account LoyaltyAccount @relation(fields: [accountId], references: [id]) account LoyaltyAccount @relation(fields: [accountId], references: [id])
@@schema("passenger")
} }
model WalletAccount { model WalletAccount {
@@ -567,6 +656,8 @@ model WalletAccount {
passenger Passenger @relation(fields: [passengerId], references: [id]) passenger Passenger @relation(fields: [passengerId], references: [id])
ledger WalletLedgerEntry[] ledger WalletLedgerEntry[]
@@index([passengerId]) @@index([passengerId])
@@schema("passenger")
} }
model WalletLedgerEntry { model WalletLedgerEntry {
@@ -579,6 +670,8 @@ model WalletLedgerEntry {
relatedBookingId String? relatedBookingId String?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
wallet WalletAccount @relation(fields: [walletId], references: [id]) wallet WalletAccount @relation(fields: [walletId], references: [id])
@@schema("passenger")
} }
model Notification { model Notification {
@@ -592,6 +685,8 @@ model Notification {
metadata Json? metadata Json?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
passenger Passenger @relation(fields: [passengerId], references: [id]) passenger Passenger @relation(fields: [passengerId], references: [id])
@@schema("passenger")
} }
model Promotion { model Promotion {
@@ -606,6 +701,8 @@ model Promotion {
deepLink String? deepLink String?
active Boolean @default(true) active Boolean @default(true)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@schema("passenger")
} }
model StationCrowdSignal { model StationCrowdSignal {
@@ -618,6 +715,8 @@ model StationCrowdSignal {
observedAt DateTime? observedAt DateTime?
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
station Station @relation(fields: [stationId], references: [id]) station Station @relation(fields: [stationId], references: [id])
@@schema("passenger")
} }
model WeatherAlert { model WeatherAlert {
@@ -628,12 +727,16 @@ model WeatherAlert {
message String message String
validUntil DateTime validUntil DateTime
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@schema("passenger")
} }
model MenuCategory { model MenuCategory {
id String @id @default(uuid()) id String @id @default(uuid())
name String name String
items MenuItem[] items MenuItem[]
@@schema("passenger")
} }
model MenuItem { model MenuItem {
@@ -647,6 +750,8 @@ model MenuItem {
availableUntil DateTime? availableUntil DateTime?
schedule TrainSchedule @relation(fields: [scheduleId], references: [id]) schedule TrainSchedule @relation(fields: [scheduleId], references: [id])
category MenuCategory @relation(fields: [categoryId], references: [id]) category MenuCategory @relation(fields: [categoryId], references: [id])
@@schema("passenger")
} }
model FoodOrder { model FoodOrder {
@@ -660,6 +765,8 @@ model FoodOrder {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
booking Booking @relation(fields: [bookingId], references: [id]) booking Booking @relation(fields: [bookingId], references: [id])
items FoodOrderItem[] items FoodOrderItem[]
@@schema("passenger")
} }
model FoodOrderItem { model FoodOrderItem {
@@ -671,6 +778,8 @@ model FoodOrderItem {
unitPriceMinor Int? unitPriceMinor Int?
lineTotalMinor Int lineTotalMinor Int
order FoodOrder @relation(fields: [orderId], references: [id]) order FoodOrder @relation(fields: [orderId], references: [id])
@@schema("passenger")
} }
model FaqCategory { model FaqCategory {
@@ -678,6 +787,8 @@ model FaqCategory {
title String title String
iconKey String? iconKey String?
articles FaqArticle[] articles FaqArticle[]
@@schema("passenger")
} }
model FaqArticle { model FaqArticle {
@@ -687,6 +798,8 @@ model FaqArticle {
answerMarkdown String answerMarkdown String
rank Int @default(0) rank Int @default(0)
category FaqCategory @relation(fields: [categoryId], references: [id]) category FaqCategory @relation(fields: [categoryId], references: [id])
@@schema("passenger")
} }
model SupportConversation { model SupportConversation {
@@ -696,6 +809,8 @@ model SupportConversation {
status SupportConversationStatus @default(OPEN) status SupportConversationStatus @default(OPEN)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
messages SupportMessage[] messages SupportMessage[]
@@schema("passenger")
} }
model SupportMessage { model SupportMessage {
@@ -706,6 +821,8 @@ model SupportMessage {
attachments Json? attachments Json?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
conversation SupportConversation @relation(fields: [conversationId], references: [id]) conversation SupportConversation @relation(fields: [conversationId], references: [id])
@@schema("passenger")
} }
model UserPreferences { model UserPreferences {
@@ -724,6 +841,8 @@ model UserPreferences {
darkMode Boolean @default(false) darkMode Boolean @default(false)
language String @default("en") language String @default("en")
user User @relation(fields: [userId], references: [id]) user User @relation(fields: [userId], references: [id])
@@schema("passenger")
} }
model Device { model Device {
@@ -735,6 +854,8 @@ model Device {
trusted Boolean @default(false) trusted Boolean @default(false)
lastSeenAt DateTime @default(now()) lastSeenAt DateTime @default(now())
user User @relation(fields: [userId], references: [id]) user User @relation(fields: [userId], references: [id])
@@schema("passenger")
} }
model SavedRoute { model SavedRoute {
@@ -747,6 +868,8 @@ model SavedRoute {
tripCount Int @default(0) tripCount Int @default(0)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
passenger Passenger @relation(fields: [passengerId], references: [id]) passenger Passenger @relation(fields: [passengerId], references: [id])
@@schema("passenger")
} }
model Journey { model Journey {
@@ -757,6 +880,8 @@ model Journey {
currency String @default("ETB") currency String @default("ETB")
createdAt DateTime @default(now()) createdAt DateTime @default(now())
journeySegments JourneySegment[] journeySegments JourneySegment[]
@@schema("passenger")
} }
model JourneySegment { model JourneySegment {
@@ -770,6 +895,8 @@ model JourneySegment {
arrivalStationId String arrivalStationId String
journey Journey @relation(fields: [journeyId], references: [id]) journey Journey @relation(fields: [journeyId], references: [id])
schedule TrainSchedule @relation(fields: [scheduleId], references: [id]) schedule TrainSchedule @relation(fields: [scheduleId], references: [id])
@@schema("passenger")
} }
model OtpCode { model OtpCode {
@@ -783,6 +910,8 @@ model OtpCode {
verified Boolean @default(false) verified Boolean @default(false)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@index([email, phone]) @@index([email, phone])
@@schema("passenger")
} }
model PasswordResetToken { model PasswordResetToken {
@@ -793,6 +922,8 @@ model PasswordResetToken {
used Boolean @default(false) used Boolean @default(false)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@index([userId]) @@index([userId])
@@schema("passenger")
} }
model Route { model Route {
@@ -806,6 +937,8 @@ model Route {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
stops RouteStop[] stops RouteStop[]
fareRules RouteFareRule[] fareRules RouteFareRule[]
@@schema("passenger")
} }
model RouteStop { model RouteStop {
@@ -818,6 +951,8 @@ model RouteStop {
route Route @relation(fields: [routeId], references: [id], onDelete: Cascade) route Route @relation(fields: [routeId], references: [id], onDelete: Cascade)
@@unique([routeId, sequence]) @@unique([routeId, sequence])
@@index([routeId, stationId]) @@index([routeId, stationId])
@@schema("passenger")
} }
model RouteFareRule { model RouteFareRule {
@@ -836,6 +971,8 @@ model RouteFareRule {
route Route @relation(fields: [routeId], references: [id], onDelete: Cascade) route Route @relation(fields: [routeId], references: [id], onDelete: Cascade)
seatClass SeatClass @relation(fields: [seatClassId], references: [id]) seatClass SeatClass @relation(fields: [seatClassId], references: [id])
@@index([routeId, seatClassId]) @@index([routeId, seatClassId])
@@schema("passenger")
} }
model Agent { model Agent {
@@ -850,6 +987,8 @@ model Agent {
bookings AgentBooking[] bookings AgentBooking[]
shifts AgentShift[] shifts AgentShift[]
commissions AgentCommission[] commissions AgentCommission[]
@@schema("passenger")
} }
model AgentBooking { model AgentBooking {
@@ -863,6 +1002,8 @@ model AgentBooking {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
agent Agent @relation(fields: [agentId], references: [id]) agent Agent @relation(fields: [agentId], references: [id])
booking Booking @relation(fields: [bookingId], references: [id]) booking Booking @relation(fields: [bookingId], references: [id])
@@schema("passenger")
} }
model AgentShift { model AgentShift {
@@ -876,6 +1017,8 @@ model AgentShift {
notes String? notes String?
agent Agent @relation(fields: [agentId], references: [id]) agent Agent @relation(fields: [agentId], references: [id])
@@index([agentId, openedAt]) @@index([agentId, openedAt])
@@schema("passenger")
} }
model AgentCommission { model AgentCommission {
@@ -888,6 +1031,8 @@ model AgentCommission {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
agent Agent @relation(fields: [agentId], references: [id]) agent Agent @relation(fields: [agentId], references: [id])
@@index([agentId, paidAt]) @@index([agentId, paidAt])
@@schema("passenger")
} }
model BookingModification { model BookingModification {
@@ -902,6 +1047,8 @@ model BookingModification {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
booking Booking @relation(fields: [bookingId], references: [id]) booking Booking @relation(fields: [bookingId], references: [id])
@@index([bookingId]) @@index([bookingId])
@@schema("passenger")
} }
model BookingCancellation { model BookingCancellation {
@@ -915,6 +1062,8 @@ model BookingCancellation {
processedAt DateTime? processedAt DateTime?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
booking Booking @relation(fields: [bookingId], references: [id]) booking Booking @relation(fields: [bookingId], references: [id])
@@schema("passenger")
} }
model GateValidationLog { model GateValidationLog {
@@ -928,6 +1077,8 @@ model GateValidationLog {
ticket Ticket @relation(fields: [ticketId], references: [id]) ticket Ticket @relation(fields: [ticketId], references: [id])
@@index([ticketId]) @@index([ticketId])
@@index([validatorId]) @@index([validatorId])
@@schema("passenger")
} }
model BaggageAllowance { model BaggageAllowance {
@@ -938,6 +1089,8 @@ model BaggageAllowance {
excessFeePerKg Int excessFeePerKg Int
currency String @default("ETB") currency String @default("ETB")
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@schema("passenger")
} }
model BaggageBooking { model BaggageBooking {
@@ -950,6 +1103,8 @@ model BaggageBooking {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
booking Booking @relation(fields: [bookingId], references: [id]) booking Booking @relation(fields: [bookingId], references: [id])
@@index([bookingId]) @@index([bookingId])
@@schema("passenger")
} }
model AuditLog { model AuditLog {
@@ -966,6 +1121,8 @@ model AuditLog {
user User? @relation(fields: [userId], references: [id]) user User? @relation(fields: [userId], references: [id])
@@index([userId, createdAt]) @@index([userId, createdAt])
@@index([entityType, entityId]) @@index([entityType, entityId])
@@schema("passenger")
} }
model NotificationTemplate { model NotificationTemplate {
@@ -976,6 +1133,8 @@ model NotificationTemplate {
bodyTemplate String bodyTemplate String
active Boolean @default(true) active Boolean @default(true)
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@schema("passenger")
} }
model SeatBlock { model SeatBlock {
@@ -988,6 +1147,8 @@ model SeatBlock {
unblockAt DateTime? unblockAt DateTime?
seat Seat @relation(fields: [seatId], references: [id]) seat Seat @relation(fields: [seatId], references: [id])
@@index([seatId]) @@index([seatId])
@@schema("passenger")
} }
model OperationalReport { model OperationalReport {
@@ -999,6 +1160,8 @@ model OperationalReport {
generatedBy String? generatedBy String?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@index([reportType, dateFrom]) @@index([reportType, dateFrom])
@@schema("passenger")
} }
model FraudRule { model FraudRule {
@@ -1009,6 +1172,8 @@ model FraudRule {
config Json? config Json?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
@@schema("passenger")
} }
model FraudAlert { model FraudAlert {
@@ -1023,6 +1188,8 @@ model FraudAlert {
user User @relation(fields: [userId], references: [id], onDelete: Cascade) user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@index([userId, createdAt]) @@index([userId, createdAt])
@@index([acknowledged]) @@index([acknowledged])
@@schema("passenger")
} }
model CurrencyExchangeRate { model CurrencyExchangeRate {
@@ -1035,6 +1202,8 @@ model CurrencyExchangeRate {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@unique([fromCurrency, toCurrency, effectiveDate]) @@unique([fromCurrency, toCurrency, effectiveDate])
@@index([fromCurrency, toCurrency]) @@index([fromCurrency, toCurrency])
@@schema("passenger")
} }
model VerifaydaVerification { model VerifaydaVerification {
@@ -1049,4 +1218,6 @@ model VerifaydaVerification {
createdAt DateTime @default(now()) createdAt DateTime @default(now())
@@index([nationalId]) @@index([nationalId])
@@index([bookingId]) @@index([bookingId])
@@schema("passenger")
} }