@bash-app/bash-common 30.65.3 → 30.65.5
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 +45 -0
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -1223,6 +1223,9 @@ model User {
|
|
|
1223
1223
|
|
|
1224
1224
|
// Artists/performers the user wants to see
|
|
1225
1225
|
artistsToSee String[] @default([])
|
|
1226
|
+
|
|
1227
|
+
// Google Calendar sync settings
|
|
1228
|
+
googleCalendarSyncSettings String? // JSON string for calendar sync preferences
|
|
1226
1229
|
|
|
1227
1230
|
// Membership system fields
|
|
1228
1231
|
membershipTier MembershipTier @default(Basic)
|
|
@@ -1246,6 +1249,12 @@ model User {
|
|
|
1246
1249
|
bashEventsTransferredFrom BashEvent[] @relation("TransferredFrom")
|
|
1247
1250
|
transferRequestsFrom BashEventTransferRequest[] @relation("TransferRequestsFrom")
|
|
1248
1251
|
transferRequestsTo BashEventTransferRequest[] @relation("TransferRequestsTo")
|
|
1252
|
+
|
|
1253
|
+
// Voucher relations
|
|
1254
|
+
redeemedVouchers Voucher[]
|
|
1255
|
+
|
|
1256
|
+
// Push notification relations
|
|
1257
|
+
pushNotificationTokens PushNotificationToken[]
|
|
1249
1258
|
}
|
|
1250
1259
|
|
|
1251
1260
|
model UserPreferences {
|
|
@@ -3709,3 +3718,39 @@ enum ReferralTier {
|
|
|
3709
3718
|
Influencer // 6-9 referrals: $20/referral
|
|
3710
3719
|
Ambashador // 10+ referrals: $25/referral
|
|
3711
3720
|
}
|
|
3721
|
+
|
|
3722
|
+
model Voucher {
|
|
3723
|
+
id String @id @default(cuid())
|
|
3724
|
+
codeHash String @unique // SHA-256 hash of the voucher code
|
|
3725
|
+
issuedToEmail String? // Email of the person who purchased the voucher
|
|
3726
|
+
shopifyOrderId String? // Reference to Shopify order if applicable
|
|
3727
|
+
stripePromotionCodeId String? // Stripe promotion code ID when redeemed
|
|
3728
|
+
status VoucherStatus @default(Active)
|
|
3729
|
+
createdAt DateTime @default(now())
|
|
3730
|
+
updatedAt DateTime @updatedAt
|
|
3731
|
+
redeemedAt DateTime? // When the voucher was redeemed
|
|
3732
|
+
redeemedByUserId String? // User who redeemed the voucher
|
|
3733
|
+
redeemedBy User? @relation(fields: [redeemedByUserId], references: [id], onDelete: SetNull)
|
|
3734
|
+
|
|
3735
|
+
@@map("vouchers")
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
enum VoucherStatus {
|
|
3739
|
+
Active
|
|
3740
|
+
Redeemed
|
|
3741
|
+
Expired
|
|
3742
|
+
Cancelled
|
|
3743
|
+
}
|
|
3744
|
+
|
|
3745
|
+
model PushNotificationToken {
|
|
3746
|
+
id String @id @default(cuid())
|
|
3747
|
+
userId String
|
|
3748
|
+
token String @unique
|
|
3749
|
+
platform String // 'ios', 'android', 'web'
|
|
3750
|
+
isActive Boolean @default(true)
|
|
3751
|
+
createdAt DateTime @default(now())
|
|
3752
|
+
updatedAt DateTime @updatedAt
|
|
3753
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
3754
|
+
|
|
3755
|
+
@@map("push_notification_tokens")
|
|
3756
|
+
}
|