@bash-app/bash-common 30.101.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.101.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",
@@ -1028,7 +1028,11 @@ model User {
1028
1028
  scoutReferralsMade ScoutReferral[] @relation("ScoutReferrer")
1029
1029
  aiRecommendationLogs AIRecommendationLog[]
1030
1030
  scoutReferralsReceived ScoutReferral[] @relation("ScoutReferred")
1031
- bookingCommissionsEarned BookingCommission[] @relation("CommissionReferrer")
1031
+
1032
+ // Service Category Requests
1033
+ serviceCategoryRequests ServiceCategoryRequest[]
1034
+ reviewedCategoryRequests ServiceCategoryRequest[] @relation("ReviewedCategoryRequests")
1035
+ bookingCommissionsEarned BookingCommission[] @relation("CommissionReferrer")
1032
1036
 
1033
1037
  // BashCash Referral Relations
1034
1038
  referredBy User? @relation("Referrals", fields: [referredById], references: [id])
@@ -1431,6 +1435,7 @@ model Service {
1431
1435
  userPromoCodeRedemption UserPromoCodeRedemption[]
1432
1436
  vendorBookingRequests VendorBookingRequest[] @relation("VendorBookingService")
1433
1437
  volunteerService VolunteerService? @relation("ServiceToVolunteer")
1438
+ serviceCategoryRequests ServiceCategoryRequest[] // Services created from approved category requests
1434
1439
  associatedBashesReferencingMe AssociatedBash[] @relation("AssociatedBashToService")
1435
1440
  bashEvent BashEvent[] @relation("BashEventToService")
1436
1441
  media Media[] @relation("MediaToService")
@@ -4548,3 +4553,52 @@ enum AmbashadorApplicationStatus {
4548
4553
  Approved
4549
4554
  Rejected
4550
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
+ }