@bash-app/bash-common 30.100.0 → 30.102.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.100.0",
3
+ "version": "30.102.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",
@@ -327,7 +327,9 @@ model BashEvent {
327
327
  absorbDonationFees Boolean @default(false)
328
328
  absorbTicketFees Boolean @default(false)
329
329
  showAttendees Boolean @default(true)
330
- serviceVisibility Json?
330
+ servicePreferences Json? // New tiered status: { "Entertainment": "need", "Sponsors": "booked_closed", ... }
331
+ bookedServices Json? // Booked service details: { "Entertainment": { serviceId: "...", providerId: "...", bookedAt: "..." }, ... }
332
+ serviceVisibility Json? // DEPRECATED: Use servicePreferences instead. Kept for backward compatibility during migration.
331
333
  originalCreatorId String?
332
334
  transferredAt DateTime?
333
335
  transferredFromId String?
@@ -1026,7 +1028,11 @@ model User {
1026
1028
  scoutReferralsMade ScoutReferral[] @relation("ScoutReferrer")
1027
1029
  aiRecommendationLogs AIRecommendationLog[]
1028
1030
  scoutReferralsReceived ScoutReferral[] @relation("ScoutReferred")
1029
- bookingCommissionsEarned BookingCommission[] @relation("CommissionReferrer")
1031
+
1032
+ // Service Category Requests
1033
+ serviceCategoryRequests ServiceCategoryRequest[]
1034
+ reviewedCategoryRequests ServiceCategoryRequest[] @relation("ReviewedCategoryRequests")
1035
+ bookingCommissionsEarned BookingCommission[] @relation("CommissionReferrer")
1030
1036
 
1031
1037
  // BashCash Referral Relations
1032
1038
  referredBy User? @relation("Referrals", fields: [referredById], references: [id])
@@ -1429,6 +1435,7 @@ model Service {
1429
1435
  userPromoCodeRedemption UserPromoCodeRedemption[]
1430
1436
  vendorBookingRequests VendorBookingRequest[] @relation("VendorBookingService")
1431
1437
  volunteerService VolunteerService? @relation("ServiceToVolunteer")
1438
+ serviceCategoryRequests ServiceCategoryRequest[] // Services created from approved category requests
1432
1439
  associatedBashesReferencingMe AssociatedBash[] @relation("AssociatedBashToService")
1433
1440
  bashEvent BashEvent[] @relation("BashEventToService")
1434
1441
  media Media[] @relation("MediaToService")
@@ -4260,6 +4267,15 @@ enum ScoutTier {
4260
4267
  Agent
4261
4268
  }
4262
4269
 
4270
+ enum ServicePreference {
4271
+ need // "Actively Seeking" - green badge, urgent priority
4272
+ open // "Open to Offers" - accepting submissions, default state
4273
+ considering // "Reviewing Options" - yellow, host is reviewing submissions
4274
+ booked_flexible // "Booked - Open to Alternatives" - orange, show current + allow alternatives
4275
+ booked_closed // "Booked" - gray, show current, no new submissions
4276
+ covered // "Covered" - gray, handled outside platform
4277
+ }
4278
+
4263
4279
  // ============================================
4264
4280
  // Security & Audit Models
4265
4281
  // ============================================
@@ -4537,3 +4553,52 @@ enum AmbashadorApplicationStatus {
4537
4553
  Approved
4538
4554
  Rejected
4539
4555
  }
4556
+
4557
+ // ============================================
4558
+ // Service Category Suggestion System
4559
+ // ============================================
4560
+
4561
+ // Stores requests for new service category types from users
4562
+ model ServiceCategoryRequest {
4563
+ id String @id @default(cuid())
4564
+ createdAt DateTime @default(now())
4565
+ updatedAt DateTime @updatedAt
4566
+
4567
+ // User who submitted the request
4568
+ userId String
4569
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
4570
+
4571
+ // Request details
4572
+ serviceType ServiceTypes // The parent service type (EntertainmentServices, EventServices, etc.)
4573
+ suggestedCategoryName String // What the user wants to call it
4574
+ description String // User's description of their service
4575
+ website String? // Optional website
4576
+ socialMediaLinks String? // Optional social media
4577
+ additionalNotes String? // Any other info
4578
+
4579
+ // Status tracking
4580
+ status ServiceCategoryRequestStatus @default(Pending)
4581
+ reviewedAt DateTime? // When admin reviewed
4582
+ reviewedById String? // Admin who reviewed
4583
+ reviewedBy User? @relation("ReviewedCategoryRequests", fields: [reviewedById], references: [id])
4584
+ adminNotes String? // Internal notes from admin
4585
+
4586
+ // If approved, track the created service
4587
+ createdServiceId String? // The draft service profile created
4588
+ createdService Service? @relation(fields: [createdServiceId], references: [id])
4589
+
4590
+ // If approved, track if a new enum value was added
4591
+ approvedCategoryName String? // The actual enum value added (might differ from suggested)
4592
+
4593
+ @@index([userId])
4594
+ @@index([status])
4595
+ @@index([serviceType])
4596
+ @@index([createdAt])
4597
+ }
4598
+
4599
+ enum ServiceCategoryRequestStatus {
4600
+ Pending // Waiting for review
4601
+ Approved // Approved and service created
4602
+ Rejected // Rejected (doesn't fit or use "Other")
4603
+ Duplicate // Already exists or similar request pending
4604
+ }