@bash-app/bash-common 30.129.0 → 30.131.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 +35 -3
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -426,6 +426,7 @@ model BashEventPromoCode {
|
|
|
426
426
|
redeemBy DateTime?
|
|
427
427
|
promoterId String?
|
|
428
428
|
meta String?
|
|
429
|
+
bashPointsRewardPerTicket Int? // Host-defined BashPoints per ticket for promoter rewards
|
|
429
430
|
promoter Promoter? @relation(fields: [promoterId], references: [id])
|
|
430
431
|
ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
|
|
431
432
|
usedBy User[] @relation("BashEventPromoCodeToUser")
|
|
@@ -860,6 +861,26 @@ model BashCreditTransaction {
|
|
|
860
861
|
@@index([type])
|
|
861
862
|
}
|
|
862
863
|
|
|
864
|
+
model PendingBashPointsGift {
|
|
865
|
+
id String @id @default(cuid())
|
|
866
|
+
senderId String
|
|
867
|
+
sender User @relation("SentPendingGifts", fields: [senderId], references: [id], onDelete: Cascade)
|
|
868
|
+
recipientEmail String
|
|
869
|
+
amount Int
|
|
870
|
+
message String?
|
|
871
|
+
status PendingGiftStatus @default(Pending)
|
|
872
|
+
claimedAt DateTime?
|
|
873
|
+
claimedByUserId String?
|
|
874
|
+
claimedBy User? @relation("ClaimedPendingGifts", fields: [claimedByUserId], references: [id], onDelete: SetNull)
|
|
875
|
+
returnedAt DateTime?
|
|
876
|
+
expiresAt DateTime
|
|
877
|
+
createdAt DateTime @default(now())
|
|
878
|
+
|
|
879
|
+
@@index([recipientEmail, status])
|
|
880
|
+
@@index([senderId])
|
|
881
|
+
@@index([expiresAt, status])
|
|
882
|
+
}
|
|
883
|
+
|
|
863
884
|
model UserReferralCode {
|
|
864
885
|
id String @id @default(cuid())
|
|
865
886
|
userId String @unique
|
|
@@ -1430,6 +1451,8 @@ model User {
|
|
|
1430
1451
|
bashEventMessagesRead BashEventMessageRead[] @relation("BashMessageReader")
|
|
1431
1452
|
transferRequestsFrom BashEventTransferRequest[] @relation("TransferRequestsFrom")
|
|
1432
1453
|
transferRequestsTo BashEventTransferRequest[] @relation("TransferRequestsTo")
|
|
1454
|
+
sentPendingGifts PendingBashPointsGift[] @relation("SentPendingGifts")
|
|
1455
|
+
claimedPendingGifts PendingBashPointsGift[] @relation("ClaimedPendingGifts")
|
|
1433
1456
|
biometricCredentials BiometricCredential[]
|
|
1434
1457
|
blocksReceived BlockedUser[] @relation("UserBlocksReceived")
|
|
1435
1458
|
blocksCreated BlockedUser[] @relation("UserBlocksMade")
|
|
@@ -3236,7 +3259,9 @@ model BashEventTransferRequest {
|
|
|
3236
3259
|
id String @id @default(cuid())
|
|
3237
3260
|
bashEventId String
|
|
3238
3261
|
fromUserId String
|
|
3239
|
-
toUserId String
|
|
3262
|
+
toUserId String? // null when transferring to a non-user by email
|
|
3263
|
+
toEmail String? // set when toUserId is null (non-user invite transfer)
|
|
3264
|
+
inviteToken String? @unique // secure token embedded in the signup/claim link
|
|
3240
3265
|
status TransferRequestStatus @default(Pending)
|
|
3241
3266
|
reason String?
|
|
3242
3267
|
requestedAt DateTime @default(now())
|
|
@@ -3244,12 +3269,12 @@ model BashEventTransferRequest {
|
|
|
3244
3269
|
expiresAt DateTime
|
|
3245
3270
|
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
3246
3271
|
fromUser User @relation("TransferRequestsFrom", fields: [fromUserId], references: [id], onDelete: Cascade)
|
|
3247
|
-
toUser User
|
|
3272
|
+
toUser User? @relation("TransferRequestsTo", fields: [toUserId], references: [id], onDelete: Cascade)
|
|
3248
3273
|
|
|
3249
|
-
@@unique([bashEventId, fromUserId, toUserId, status])
|
|
3250
3274
|
@@index([bashEventId])
|
|
3251
3275
|
@@index([toUserId, status])
|
|
3252
3276
|
@@index([fromUserId])
|
|
3277
|
+
@@index([toEmail, status])
|
|
3253
3278
|
}
|
|
3254
3279
|
|
|
3255
3280
|
model EventUpdateNotificationQueue {
|
|
@@ -5399,6 +5424,13 @@ enum CreditSourceType {
|
|
|
5399
5424
|
AdminAdjustment // Manual credit by admin
|
|
5400
5425
|
PromotionalBonus // Marketing campaigns
|
|
5401
5426
|
PromoterCommission // Commission earned from promo code usage
|
|
5427
|
+
GiftedPoints // BashPoints gifted to another user
|
|
5428
|
+
}
|
|
5429
|
+
|
|
5430
|
+
enum PendingGiftStatus {
|
|
5431
|
+
Pending
|
|
5432
|
+
Claimed
|
|
5433
|
+
Returned
|
|
5402
5434
|
}
|
|
5403
5435
|
|
|
5404
5436
|
enum ReferralTier {
|