@bash-app/bash-common 30.153.0 → 30.154.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 +22 -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[]
|
|
@@ -5842,6 +5844,26 @@ model RewardReport {
|
|
|
5842
5844
|
@@index([status])
|
|
5843
5845
|
}
|
|
5844
5846
|
|
|
5847
|
+
/// Reports on hard-coded national chains (nationalBirthdayRewards.ts). Super users review and update the file.
|
|
5848
|
+
model NationalChainReport {
|
|
5849
|
+
id String @id @default(cuid())
|
|
5850
|
+
nationalBrandId String // e.g. "national-starbucks" — id from NATIONAL_BIRTHDAY_REWARDS
|
|
5851
|
+
nationalBrandName String // Denormalized for display
|
|
5852
|
+
userId String
|
|
5853
|
+
reportedAt DateTime @default(now())
|
|
5854
|
+
reason String @db.Text
|
|
5855
|
+
suggestedChanges String? @db.Text
|
|
5856
|
+
status RewardReportStatus @default(Pending)
|
|
5857
|
+
reviewedAt DateTime?
|
|
5858
|
+
reviewedById String?
|
|
5859
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
5860
|
+
reviewedBy User? @relation("NationalChainReportReviewedBy", fields: [reviewedById], references: [id], onDelete: SetNull)
|
|
5861
|
+
|
|
5862
|
+
@@index([nationalBrandId])
|
|
5863
|
+
@@index([userId])
|
|
5864
|
+
@@index([status])
|
|
5865
|
+
}
|
|
5866
|
+
|
|
5845
5867
|
// Part B: User saved locations (birthday home base, etc.)
|
|
5846
5868
|
model UserLocation {
|
|
5847
5869
|
id String @id @default(cuid())
|