@bash-app/bash-common 30.65.4 → 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 +32 -13
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,9 +1249,12 @@ model User {
|
|
|
1246
1249
|
bashEventsTransferredFrom BashEvent[] @relation("TransferredFrom")
|
|
1247
1250
|
transferRequestsFrom BashEventTransferRequest[] @relation("TransferRequestsFrom")
|
|
1248
1251
|
transferRequestsTo BashEventTransferRequest[] @relation("TransferRequestsTo")
|
|
1249
|
-
|
|
1252
|
+
|
|
1250
1253
|
// Voucher relations
|
|
1251
|
-
redeemedVouchers
|
|
1254
|
+
redeemedVouchers Voucher[]
|
|
1255
|
+
|
|
1256
|
+
// Push notification relations
|
|
1257
|
+
pushNotificationTokens PushNotificationToken[]
|
|
1252
1258
|
}
|
|
1253
1259
|
|
|
1254
1260
|
model UserPreferences {
|
|
@@ -3714,17 +3720,17 @@ enum ReferralTier {
|
|
|
3714
3720
|
}
|
|
3715
3721
|
|
|
3716
3722
|
model Voucher {
|
|
3717
|
-
id
|
|
3718
|
-
codeHash
|
|
3719
|
-
issuedToEmail
|
|
3720
|
-
shopifyOrderId
|
|
3721
|
-
stripePromotionCodeId
|
|
3722
|
-
status
|
|
3723
|
-
createdAt
|
|
3724
|
-
updatedAt
|
|
3725
|
-
redeemedAt
|
|
3726
|
-
redeemedByUserId
|
|
3727
|
-
redeemedBy
|
|
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)
|
|
3728
3734
|
|
|
3729
3735
|
@@map("vouchers")
|
|
3730
3736
|
}
|
|
@@ -3735,3 +3741,16 @@ enum VoucherStatus {
|
|
|
3735
3741
|
Expired
|
|
3736
3742
|
Cancelled
|
|
3737
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
|
+
}
|