@bash-app/bash-common 30.130.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 +29 -0
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -861,6 +861,26 @@ model BashCreditTransaction {
|
|
|
861
861
|
@@index([type])
|
|
862
862
|
}
|
|
863
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
|
+
|
|
864
884
|
model UserReferralCode {
|
|
865
885
|
id String @id @default(cuid())
|
|
866
886
|
userId String @unique
|
|
@@ -1431,6 +1451,8 @@ model User {
|
|
|
1431
1451
|
bashEventMessagesRead BashEventMessageRead[] @relation("BashMessageReader")
|
|
1432
1452
|
transferRequestsFrom BashEventTransferRequest[] @relation("TransferRequestsFrom")
|
|
1433
1453
|
transferRequestsTo BashEventTransferRequest[] @relation("TransferRequestsTo")
|
|
1454
|
+
sentPendingGifts PendingBashPointsGift[] @relation("SentPendingGifts")
|
|
1455
|
+
claimedPendingGifts PendingBashPointsGift[] @relation("ClaimedPendingGifts")
|
|
1434
1456
|
biometricCredentials BiometricCredential[]
|
|
1435
1457
|
blocksReceived BlockedUser[] @relation("UserBlocksReceived")
|
|
1436
1458
|
blocksCreated BlockedUser[] @relation("UserBlocksMade")
|
|
@@ -5402,6 +5424,13 @@ enum CreditSourceType {
|
|
|
5402
5424
|
AdminAdjustment // Manual credit by admin
|
|
5403
5425
|
PromotionalBonus // Marketing campaigns
|
|
5404
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
|
|
5405
5434
|
}
|
|
5406
5435
|
|
|
5407
5436
|
enum ReferralTier {
|