@bash-app/bash-common 30.42.0 → 30.44.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 +20 -13
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -1067,9 +1067,7 @@ model User {
|
|
|
1067
1067
|
contactlist ContactList[]
|
|
1068
1068
|
|
|
1069
1069
|
bashEventPromoCodesIUsed BashEventPromoCode[]
|
|
1070
|
-
// bookingForMe Booking[]
|
|
1071
1070
|
userSubscription UserSubscription?
|
|
1072
|
-
// serviceSubscriptions ServiceSubscription[]
|
|
1073
1071
|
volunteerService VolunteerService[]
|
|
1074
1072
|
stripeAccounts StripeAccount[]
|
|
1075
1073
|
userPromoCodeRedemption UserPromoCodeRedemption[]
|
|
@@ -1092,13 +1090,11 @@ model User {
|
|
|
1092
1090
|
preferences UserPreferences?
|
|
1093
1091
|
userStats UserStats?
|
|
1094
1092
|
|
|
1095
|
-
// Add fields for user suspension
|
|
1096
1093
|
suspendedUntil DateTime?
|
|
1097
1094
|
suspendedById String?
|
|
1098
1095
|
suspendedBy User? @relation("SuspendedUsers", fields: [suspendedById], references: [id], onDelete: SetNull)
|
|
1099
1096
|
suspendedUsers User[] @relation("SuspendedUsers")
|
|
1100
1097
|
|
|
1101
|
-
// Add relations for reports and demerits
|
|
1102
1098
|
reportsMade UserReport[] @relation("ReportsMade")
|
|
1103
1099
|
reportsReceived UserReport[] @relation("ReportsReceived")
|
|
1104
1100
|
reportsReviewed UserReport[] @relation("ReportsReviewed")
|
|
@@ -1109,6 +1105,12 @@ model User {
|
|
|
1109
1105
|
notification Notification[] @relation("NotificationsReceivedByMe")
|
|
1110
1106
|
followers UserFollowing[] @relation("Following")
|
|
1111
1107
|
following UserFollowing[] @relation("Follower")
|
|
1108
|
+
|
|
1109
|
+
// For lightweight sign-up
|
|
1110
|
+
isLightweightAccount Boolean @default(false)
|
|
1111
|
+
notifyForTrendingBashes Boolean @default(false)
|
|
1112
|
+
trendingBashThreshold Int @default(10) // Min attendees to trigger notification
|
|
1113
|
+
organizerUser UserFollowing[] @relation("FollowingOrganizers")
|
|
1112
1114
|
}
|
|
1113
1115
|
|
|
1114
1116
|
model UserPreferences {
|
|
@@ -1127,6 +1129,8 @@ model UserPreferences {
|
|
|
1127
1129
|
invitationNotify Boolean @default(true)
|
|
1128
1130
|
eventUpdatesNotify Boolean @default(true)
|
|
1129
1131
|
servicePromotionsNotify Boolean @default(true)
|
|
1132
|
+
trendingBashesNotify Boolean @default(false) // New field
|
|
1133
|
+
organizerUpdatesNotify Boolean @default(false) // New field
|
|
1130
1134
|
|
|
1131
1135
|
// Privacy Settings
|
|
1132
1136
|
profileVisibility String @default("PUBLIC") // PUBLIC, FRIENDS, PRIVATE
|
|
@@ -1180,15 +1184,18 @@ model UserPreferences {
|
|
|
1180
1184
|
}
|
|
1181
1185
|
|
|
1182
1186
|
model UserFollowing {
|
|
1183
|
-
id
|
|
1184
|
-
userId
|
|
1185
|
-
followingId
|
|
1186
|
-
isFollowing
|
|
1187
|
-
followedAt
|
|
1188
|
-
unfollowedAt
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1187
|
+
id String @id @default(cuid())
|
|
1188
|
+
userId String
|
|
1189
|
+
followingId String
|
|
1190
|
+
isFollowing Boolean @default(true)
|
|
1191
|
+
followedAt DateTime?
|
|
1192
|
+
unfollowedAt DateTime?
|
|
1193
|
+
isOrganizer Boolean @default(false) // Flag if following as organizer
|
|
1194
|
+
lastNotified DateTime? // For organizer notifications
|
|
1195
|
+
|
|
1196
|
+
user User @relation("Follower", fields: [userId], references: [id], onDelete: Cascade, map: "UserFollowing_follower_fkey")
|
|
1197
|
+
following User @relation("Following", fields: [followingId], references: [id], onDelete: Cascade)
|
|
1198
|
+
organizerUser User? @relation("FollowingOrganizers", fields: [userId], references: [id], onDelete: Cascade, map: "UserFollowing_organizer_fkey")
|
|
1192
1199
|
|
|
1193
1200
|
@@unique([userId, followingId])
|
|
1194
1201
|
}
|