@bash-app/bash-common 30.67.1 → 30.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "30.67.1",
3
+ "version": "30.68.0",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1263,6 +1263,9 @@ model User {
1263
1263
 
1264
1264
  // Vendor booking relations
1265
1265
  vendorBookingRequestsAsHost VendorBookingRequest[] @relation("VendorBookingHost")
1266
+
1267
+ // Vendor booking messages
1268
+ vendorBookingMessages VendorBookingMessage[] @relation("VendorMessageSender")
1266
1269
  }
1267
1270
 
1268
1271
  model UserPreferences {
@@ -3541,6 +3544,9 @@ model VendorBookingRequest {
3541
3544
  // Response from vendor
3542
3545
  vendorResponse String? // Vendor's message when accepting/rejecting
3543
3546
  respondedAt DateTime?
3547
+
3548
+ // Messages relation
3549
+ messages VendorBookingMessage[]
3544
3550
 
3545
3551
  @@index([hostUserId])
3546
3552
  @@index([vendorServiceId])
@@ -3548,6 +3554,35 @@ model VendorBookingRequest {
3548
3554
  @@index([createdAt])
3549
3555
  }
3550
3556
 
3557
+ // Simple messaging system for vendor-host coordination
3558
+ model VendorBookingMessage {
3559
+ id String @id @default(cuid())
3560
+ createdAt DateTime @default(now())
3561
+ updatedAt DateTime @updatedAt
3562
+
3563
+ // Relations
3564
+ vendorBookingRequestId String
3565
+ vendorBookingRequest VendorBookingRequest @relation(fields: [vendorBookingRequestId], references: [id], onDelete: Cascade)
3566
+
3567
+ senderId String
3568
+ sender User @relation("VendorMessageSender", fields: [senderId], references: [id], onDelete: Cascade)
3569
+
3570
+ // Message content
3571
+ message String @db.Text
3572
+ messageType String @default("text") // "text", "system", "payment_update", etc.
3573
+
3574
+ // Read status
3575
+ isRead Boolean @default(false)
3576
+ readAt DateTime?
3577
+
3578
+ // Metadata
3579
+ metadata Json? // For storing additional message data like payment info, etc.
3580
+
3581
+ @@index([vendorBookingRequestId])
3582
+ @@index([senderId])
3583
+ @@index([createdAt])
3584
+ }
3585
+
3551
3586
  enum VendorBookingStatus {
3552
3587
  PENDING // Initial request sent
3553
3588
  ACCEPTED // Vendor accepted, awaiting payment