@bash-app/bash-common 30.153.0 → 30.155.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 +1 -1
- package/prisma/schema.prisma +26 -0
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -1498,6 +1498,8 @@ model User {
|
|
|
1498
1498
|
birthdayDealSuggestions BirthdayDealSuggestion[]
|
|
1499
1499
|
rewardReports RewardReport[]
|
|
1500
1500
|
rewardReportsReviewed RewardReport[] @relation("RewardReportReviewedBy")
|
|
1501
|
+
nationalChainReports NationalChainReport[]
|
|
1502
|
+
nationalChainReportsReviewed NationalChainReport[] @relation("NationalChainReportReviewedBy")
|
|
1501
1503
|
userLocations UserLocation[]
|
|
1502
1504
|
birthdayLocation UserLocation? @relation("UserBirthdayLocation", fields: [birthdayLocationId], references: [id], onDelete: SetNull)
|
|
1503
1505
|
offerClaims OfferClaim[]
|
|
@@ -5738,6 +5740,7 @@ enum BirthdayFreebieCategory {
|
|
|
5738
5740
|
enum BirthdayFreebieExpirationType {
|
|
5739
5741
|
DayOf
|
|
5740
5742
|
Valid30Days
|
|
5743
|
+
ValidDays
|
|
5741
5744
|
}
|
|
5742
5745
|
|
|
5743
5746
|
enum BirthdayOfferQualityTier {
|
|
@@ -5784,6 +5787,8 @@ model BirthdayFreebieCatalog {
|
|
|
5784
5787
|
qualityTier BirthdayOfferQualityTier? // Awesome / Okay / Lame — set by super users on approve
|
|
5785
5788
|
address String? @db.Text // For Maps and display
|
|
5786
5789
|
redemptionNotes String? @db.Text // Conditions, limitations
|
|
5790
|
+
expirationDays Int? // when Valid30Days with custom count
|
|
5791
|
+
isNational Boolean @default(false)
|
|
5787
5792
|
createdAt DateTime @default(now())
|
|
5788
5793
|
updatedAt DateTime @updatedAt
|
|
5789
5794
|
|
|
@@ -5793,6 +5798,7 @@ model BirthdayFreebieCatalog {
|
|
|
5793
5798
|
|
|
5794
5799
|
@@index([stateSlug, citySlug])
|
|
5795
5800
|
@@index([isActive])
|
|
5801
|
+
@@index([isNational])
|
|
5796
5802
|
@@index([sector])
|
|
5797
5803
|
}
|
|
5798
5804
|
|
|
@@ -5842,6 +5848,26 @@ model RewardReport {
|
|
|
5842
5848
|
@@index([status])
|
|
5843
5849
|
}
|
|
5844
5850
|
|
|
5851
|
+
/// Reports on hard-coded national chains (nationalBirthdayRewards.ts). Super users review and update the file.
|
|
5852
|
+
model NationalChainReport {
|
|
5853
|
+
id String @id @default(cuid())
|
|
5854
|
+
nationalBrandId String // e.g. "national-starbucks" — id from NATIONAL_BIRTHDAY_REWARDS
|
|
5855
|
+
nationalBrandName String // Denormalized for display
|
|
5856
|
+
userId String
|
|
5857
|
+
reportedAt DateTime @default(now())
|
|
5858
|
+
reason String @db.Text
|
|
5859
|
+
suggestedChanges String? @db.Text
|
|
5860
|
+
status RewardReportStatus @default(Pending)
|
|
5861
|
+
reviewedAt DateTime?
|
|
5862
|
+
reviewedById String?
|
|
5863
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
5864
|
+
reviewedBy User? @relation("NationalChainReportReviewedBy", fields: [reviewedById], references: [id], onDelete: SetNull)
|
|
5865
|
+
|
|
5866
|
+
@@index([nationalBrandId])
|
|
5867
|
+
@@index([userId])
|
|
5868
|
+
@@index([status])
|
|
5869
|
+
}
|
|
5870
|
+
|
|
5845
5871
|
// Part B: User saved locations (birthday home base, etc.)
|
|
5846
5872
|
model UserLocation {
|
|
5847
5873
|
id String @id @default(cuid())
|