@bash-app/bash-common 30.140.0 → 30.141.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 +60 -60
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -416,20 +416,20 @@ model SentReminder {
|
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
model BashEventPromoCode {
|
|
419
|
-
id
|
|
420
|
-
code
|
|
421
|
-
ticketTierId
|
|
422
|
-
stripeCouponId
|
|
423
|
-
discountAmountInCents
|
|
424
|
-
discountAmountPercentage
|
|
425
|
-
maxRedemptions
|
|
426
|
-
redeemBy
|
|
427
|
-
promoterId
|
|
428
|
-
meta
|
|
429
|
-
bashPointsRewardPerTicket Int?
|
|
430
|
-
promoter
|
|
431
|
-
ticketTier
|
|
432
|
-
usedBy
|
|
419
|
+
id String @id @default(cuid())
|
|
420
|
+
code String
|
|
421
|
+
ticketTierId String
|
|
422
|
+
stripeCouponId String?
|
|
423
|
+
discountAmountInCents Int?
|
|
424
|
+
discountAmountPercentage Int?
|
|
425
|
+
maxRedemptions Int?
|
|
426
|
+
redeemBy DateTime?
|
|
427
|
+
promoterId String?
|
|
428
|
+
meta String?
|
|
429
|
+
bashPointsRewardPerTicket Int? // Host-defined BashPoints per ticket for promoter rewards
|
|
430
|
+
promoter Promoter? @relation(fields: [promoterId], references: [id])
|
|
431
|
+
ticketTier TicketTier @relation(fields: [ticketTierId], references: [id])
|
|
432
|
+
usedBy User[] @relation("BashEventPromoCodeToUser")
|
|
433
433
|
|
|
434
434
|
@@unique([ticketTierId, code])
|
|
435
435
|
}
|
|
@@ -867,19 +867,19 @@ model BashCreditTransaction {
|
|
|
867
867
|
}
|
|
868
868
|
|
|
869
869
|
model PendingBashPointsGift {
|
|
870
|
-
id
|
|
871
|
-
senderId
|
|
872
|
-
sender
|
|
873
|
-
recipientEmail
|
|
874
|
-
amount
|
|
875
|
-
message
|
|
876
|
-
status
|
|
877
|
-
claimedAt
|
|
870
|
+
id String @id @default(cuid())
|
|
871
|
+
senderId String
|
|
872
|
+
sender User @relation("SentPendingGifts", fields: [senderId], references: [id], onDelete: Cascade)
|
|
873
|
+
recipientEmail String
|
|
874
|
+
amount Int
|
|
875
|
+
message String?
|
|
876
|
+
status PendingGiftStatus @default(Pending)
|
|
877
|
+
claimedAt DateTime?
|
|
878
878
|
claimedByUserId String?
|
|
879
|
-
claimedBy
|
|
880
|
-
returnedAt
|
|
881
|
-
expiresAt
|
|
882
|
-
createdAt
|
|
879
|
+
claimedBy User? @relation("ClaimedPendingGifts", fields: [claimedByUserId], references: [id], onDelete: SetNull)
|
|
880
|
+
returnedAt DateTime?
|
|
881
|
+
expiresAt DateTime
|
|
882
|
+
createdAt DateTime @default(now())
|
|
883
883
|
|
|
884
884
|
@@index([recipientEmail, status])
|
|
885
885
|
@@index([senderId])
|
|
@@ -1099,20 +1099,20 @@ model Recurrence {
|
|
|
1099
1099
|
|
|
1100
1100
|
// Recurring event series: template that spawns many BashEvent instances (e.g. "Every Tuesday 7pm for 14 weeks")
|
|
1101
1101
|
model EventSeries {
|
|
1102
|
-
id String
|
|
1102
|
+
id String @id @default(cuid())
|
|
1103
1103
|
organizationId String?
|
|
1104
1104
|
creatorId String
|
|
1105
1105
|
name String
|
|
1106
|
-
description String?
|
|
1106
|
+
description String? @db.Text
|
|
1107
1107
|
frequency RecurringFrequency
|
|
1108
|
-
interval Int
|
|
1108
|
+
interval Int @default(1)
|
|
1109
1109
|
repeatOnDays DayOfWeek[]
|
|
1110
1110
|
seriesStart DateTime
|
|
1111
1111
|
seriesEnd DateTime
|
|
1112
|
-
exceptions Json?
|
|
1113
|
-
templateConfig Json?
|
|
1114
|
-
createdAt DateTime
|
|
1115
|
-
updatedAt DateTime
|
|
1112
|
+
exceptions Json? // Array of ISO date strings to skip
|
|
1113
|
+
templateConfig Json? // Event defaults: title pattern, ticketTiers, etc.
|
|
1114
|
+
createdAt DateTime @default(now())
|
|
1115
|
+
updatedAt DateTime @updatedAt
|
|
1116
1116
|
|
|
1117
1117
|
organization Organization? @relation("OrganizationEventSeries", fields: [organizationId], references: [id], onDelete: SetNull)
|
|
1118
1118
|
creator User @relation("EventSeriesCreator", fields: [creatorId], references: [id], onDelete: Restrict)
|
|
@@ -2503,7 +2503,7 @@ model Organization {
|
|
|
2503
2503
|
subscriptionStatus String?
|
|
2504
2504
|
stripeSubscriptionId String? @unique
|
|
2505
2505
|
stripeCustomerId String?
|
|
2506
|
-
stripeConnectedAccountId
|
|
2506
|
+
stripeConnectedAccountId String? // Org-level Stripe account for wallet display
|
|
2507
2507
|
inheritBrandingFromParent Boolean @default(true)
|
|
2508
2508
|
latitude Float?
|
|
2509
2509
|
longitude Float?
|
|
@@ -2526,28 +2526,28 @@ model Organization {
|
|
|
2526
2526
|
}
|
|
2527
2527
|
|
|
2528
2528
|
model OrganizationMember {
|
|
2529
|
-
id
|
|
2530
|
-
organizationId
|
|
2531
|
-
userId
|
|
2532
|
-
role
|
|
2533
|
-
membershipTier
|
|
2534
|
-
status
|
|
2535
|
-
joinedAt
|
|
2536
|
-
approvedAt
|
|
2537
|
-
approvedBy
|
|
2538
|
-
paidUntil
|
|
2539
|
-
paymentStatus
|
|
2540
|
-
guestLimit
|
|
2541
|
-
canInvite
|
|
2542
|
-
canCreateEvents
|
|
2543
|
-
canManageBudgets
|
|
2544
|
-
engagementScore Float?
|
|
2529
|
+
id String @id @default(cuid())
|
|
2530
|
+
organizationId String
|
|
2531
|
+
userId String
|
|
2532
|
+
role String @default("Member") // Owner, Admin, Coordinator, EventOrganizer, Treasurer, Member
|
|
2533
|
+
membershipTier String @default("Base") // Base, Premium
|
|
2534
|
+
status String @default("Pending") // Pending, Active, Suspended, Removed
|
|
2535
|
+
joinedAt DateTime @default(now())
|
|
2536
|
+
approvedAt DateTime?
|
|
2537
|
+
approvedBy String?
|
|
2538
|
+
paidUntil DateTime?
|
|
2539
|
+
paymentStatus String? @default("Current") // Current, Overdue, Cancelled
|
|
2540
|
+
guestLimit Int?
|
|
2541
|
+
canInvite Boolean @default(true)
|
|
2542
|
+
canCreateEvents Boolean @default(false)
|
|
2543
|
+
canManageBudgets Boolean @default(false)
|
|
2544
|
+
engagementScore Float? // Computed: weighted formula (events, recency, points, referrals)
|
|
2545
2545
|
lastActiveAt DateTime? // Last event attended
|
|
2546
|
-
totalEventsAttended Int
|
|
2546
|
+
totalEventsAttended Int @default(0)
|
|
2547
2547
|
firstEventAttendedAt DateTime?
|
|
2548
|
-
organization
|
|
2549
|
-
user
|
|
2550
|
-
eventRSVPs
|
|
2548
|
+
organization Organization @relation(fields: [organizationId], references: [id], onDelete: Cascade)
|
|
2549
|
+
user User @relation("OrganizationMemberUser", fields: [userId], references: [id], onDelete: Cascade)
|
|
2550
|
+
eventRSVPs EventRSVP[]
|
|
2551
2551
|
|
|
2552
2552
|
@@unique([organizationId, userId])
|
|
2553
2553
|
@@index([organizationId])
|
|
@@ -3309,8 +3309,8 @@ model BashEventTransferRequest {
|
|
|
3309
3309
|
id String @id @default(cuid())
|
|
3310
3310
|
bashEventId String
|
|
3311
3311
|
fromUserId String
|
|
3312
|
-
toUserId String?
|
|
3313
|
-
toEmail String?
|
|
3312
|
+
toUserId String? // null when transferring to a non-user by email
|
|
3313
|
+
toEmail String? // set when toUserId is null (non-user invite transfer)
|
|
3314
3314
|
inviteToken String? @unique // secure token embedded in the signup/claim link
|
|
3315
3315
|
status TransferRequestStatus @default(Pending)
|
|
3316
3316
|
reason String?
|
|
@@ -3564,9 +3564,9 @@ enum NotificationType {
|
|
|
3564
3564
|
BashRatingMilestone
|
|
3565
3565
|
BashFeedPost
|
|
3566
3566
|
EventMilestone
|
|
3567
|
-
WaitlistRequested
|
|
3568
|
-
WaitlistApproved
|
|
3569
|
-
WaitlistDenied
|
|
3567
|
+
WaitlistRequested // Host: someone requested a spot on your waitlist
|
|
3568
|
+
WaitlistApproved // Attendee: host approved your waitlist request
|
|
3569
|
+
WaitlistDenied // Attendee: host denied your waitlist request
|
|
3570
3570
|
WaitlistSpotAvailable // Waitlister: a refund opened a spot — claim it now
|
|
3571
3571
|
WaitlistSpotMayBeOpen // Waitlister: someone left the venue — standby at door
|
|
3572
3572
|
}
|
|
@@ -3605,7 +3605,7 @@ enum TicketStatus {
|
|
|
3605
3605
|
LeftRadius
|
|
3606
3606
|
Pending
|
|
3607
3607
|
WaitlistPending // Requested a spot on a host-approval waitlist; awaiting decision
|
|
3608
|
-
RefundPending
|
|
3608
|
+
RefundPending // Refund requested; held while next waitlister is given a claim window
|
|
3609
3609
|
}
|
|
3610
3610
|
|
|
3611
3611
|
enum DayOfWeek {
|