fixed the schema and the NA problem and multiple transport creation

This commit is contained in:
2026-01-05 13:28:25 +05:30
parent fafb5d06a7
commit e286cffa49
4 changed files with 95 additions and 81 deletions

View File

@@ -874,19 +874,19 @@ model Activities {
checkOutAddress String? @map("check_out_address") @db.VarChar(150)
set_early_checkin_time_mins String @default("null") @map("set_early_checkin_time_mins") @db.VarChar(200)
activityDurationMins Int? @map("activity_duration_mins")
foodAvailable Boolean? @default(false) @map("food_available")
foodIsChargeable Boolean? @default(false) @map("food_is_chargeable")
alcoholAvailable Boolean? @default(false) @map("alcohol_available")
trainerAvailable Boolean? @default(false) @map("trainer_available")
trainerIsChargeable Boolean? @default(false) @map("trainer_is_chargeable")
pickUpDropAvailable Boolean? @default(false) @map("pick_up_drop_available")
pickUpDropIsChargeable Boolean? @default(false) @map("pick_up_drop_is_chargeable")
inActivityAvailable Boolean? @default(false) @map("in_activity_available")
inActivityIsChargeable Boolean? @default(false) @map("in_activity_is_chargeable")
is_late_checking_allowed Boolean? @default(false) @map("is_late_checking_allowed")
equipmentAvailable Boolean? @default(false) @map("equipment_available")
equipmentIsChargeable Boolean? @default(false) @map("equipment_is_chargeable")
cancellationAvailable Boolean? @default(false) @map("cancellation_available")
foodAvailable Boolean? @map("food_available")
foodIsChargeable Boolean? @map("food_is_chargeable")
alcoholAvailable Boolean? @map("alcohol_available")
trainerAvailable Boolean? @map("trainer_available")
trainerIsChargeable Boolean? @map("trainer_is_chargeable")
pickUpDropAvailable Boolean? @map("pick_up_drop_available")
pickUpDropIsChargeable Boolean? @map("pick_up_drop_is_chargeable")
inActivityAvailable Boolean? @map("in_activity_available")
inActivityIsChargeable Boolean? @map("in_activity_is_chargeable")
is_late_checking_allowed Boolean? @map("is_late_checking_allowed")
equipmentAvailable Boolean? @map("equipment_available")
equipmentIsChargeable Boolean? @map("equipment_is_chargeable")
cancellationAvailable Boolean? @map("cancellation_available")
// 🔹 Creator / owner
userId Int?
user User? @relation("UserActivities", fields: [userId], references: [id])
@@ -1385,7 +1385,6 @@ model ActivityPickUpDetails {
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
deletedAt DateTime? @map("deleted_at")
activityPickUpTransport ActivityPickUpTransport[]
activityPickUpTransportTaxes ActivityPickUpTransportTaxes[]
@@map("activity_pick_up_details")
@@ -1393,17 +1392,15 @@ model ActivityPickUpDetails {
}
model ActivityPickUpTransport {
id Int @id @default(autoincrement())
activityXid Int @map("activity_xid")
activity Activities @relation(fields: [activityXid], references: [id], onDelete: Cascade)
transportModeXid Int @map("transport_mode_xid")
transportMode TransportModes @relation(fields: [transportModeXid], references: [id], onDelete: Restrict)
isActive Boolean @default(true) @map("is_active")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
deletedAt DateTime? @map("deleted_at")
activityPickUpDetails ActivityPickUpDetails? @relation(fields: [activityPickUpDetailsId], references: [id])
activityPickUpDetailsId Int?
id Int @id @default(autoincrement())
activityXid Int @map("activity_xid")
activity Activities @relation(fields: [activityXid], references: [id], onDelete: Cascade)
transportModeXid Int @map("transport_mode_xid")
transportMode TransportModes @relation(fields: [transportModeXid], references: [id], onDelete: Restrict)
isActive Boolean @default(true) @map("is_active")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
deletedAt DateTime? @map("deleted_at")
@@map("activity_pick_up_transport")
@@schema("act")