@bash-app/bash-common 30.63.0 → 30.65.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
CHANGED
|
@@ -1,36 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
--
|
|
3
|
-
|
|
4
|
-
-- Add Basic to MembershipTier (if not exists)
|
|
5
|
-
DO $
|
|
6
|
-
$
|
|
7
|
-
BEGIN
|
|
8
|
-
IF NOT EXISTS (
|
|
9
|
-
SELECT 1
|
|
10
|
-
FROM pg_enum
|
|
11
|
-
WHERE enumlabel = 'Basic'
|
|
12
|
-
AND enumtypid = (
|
|
13
|
-
SELECT oid
|
|
14
|
-
FROM pg_type
|
|
15
|
-
WHERE typname = 'MembershipTier'
|
|
16
|
-
)
|
|
17
|
-
) THEN
|
|
18
|
-
ALTER TYPE "MembershipTier"
|
|
19
|
-
ADD VALUE 'Basic';
|
|
20
|
-
END
|
|
21
|
-
IF;
|
|
22
|
-
END $$;
|
|
23
|
-
|
|
24
|
-
-- Update existing Guest values to Basic
|
|
25
|
-
UPDATE "User"
|
|
26
|
-
SET "membershipTier" = 'Basic'
|
|
27
|
-
::"MembershipTier"
|
|
28
|
-
WHERE "membershipTier" = 'Guest'::"MembershipTier";
|
|
29
|
-
|
|
30
|
-
-- Update default value
|
|
31
|
-
ALTER TABLE "User"
|
|
32
|
-
ALTER COLUMN "membershipTier"
|
|
33
|
-
SET
|
|
34
|
-
DEFAULT 'Basic'::"MembershipTier";
|
|
1
|
+
/* Prisma Migrate: disable-transaction */
|
|
2
|
+
-- Step 1: Add Basic to MembershipTier (must be committed before use)
|
|
3
|
+
ALTER TYPE "MembershipTier" ADD VALUE 'Basic';
|
|
35
4
|
|
|
36
5
|
|
package/prisma/schema.prisma
CHANGED
|
@@ -1085,20 +1085,20 @@ enum SocialMediaPlatform {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
|
|
1087
1087
|
model User {
|
|
1088
|
-
id String
|
|
1089
|
-
username String?
|
|
1090
|
-
email String
|
|
1091
|
-
createdOn DateTime
|
|
1092
|
-
stripeCustomerId String?
|
|
1093
|
-
stripeAccountId String?
|
|
1094
|
-
isSuperUser Boolean
|
|
1095
|
-
isSuspended Boolean
|
|
1088
|
+
id String @id @default(cuid())
|
|
1089
|
+
username String? @unique
|
|
1090
|
+
email String @unique
|
|
1091
|
+
createdOn DateTime @default(now())
|
|
1092
|
+
stripeCustomerId String? @unique
|
|
1093
|
+
stripeAccountId String? @unique
|
|
1094
|
+
isSuperUser Boolean @default(false)
|
|
1095
|
+
isSuspended Boolean @default(false)
|
|
1096
1096
|
intent UserIntent?
|
|
1097
1097
|
googleCalendarAccess String?
|
|
1098
1098
|
googleCalendarSyncSettings String?
|
|
1099
1099
|
givenName String?
|
|
1100
1100
|
familyName String?
|
|
1101
|
-
nameChangeCount Int
|
|
1101
|
+
nameChangeCount Int @default(0)
|
|
1102
1102
|
hash String?
|
|
1103
1103
|
emailVerified DateTime?
|
|
1104
1104
|
image String?
|
|
@@ -1106,19 +1106,19 @@ model User {
|
|
|
1106
1106
|
dob DateTime?
|
|
1107
1107
|
gender Gender?
|
|
1108
1108
|
sex Sex?
|
|
1109
|
-
roles UserRole[]
|
|
1109
|
+
roles UserRole[] @default([User])
|
|
1110
1110
|
aboutMe String?
|
|
1111
1111
|
levelBadge String?
|
|
1112
|
-
temporaryBadges String[]
|
|
1113
|
-
ownedServices Service[]
|
|
1114
|
-
createdServices Service[]
|
|
1115
|
-
createdEvents BashEvent[]
|
|
1112
|
+
temporaryBadges String[] @default([])
|
|
1113
|
+
ownedServices Service[] @relation("OwnedService")
|
|
1114
|
+
createdServices Service[] @relation("CreatedService")
|
|
1115
|
+
createdEvents BashEvent[] @relation("CreatedEvent")
|
|
1116
1116
|
checkouts Checkout[]
|
|
1117
|
-
ticketsISent Ticket[]
|
|
1118
|
-
ticketsIOwn Ticket[]
|
|
1119
|
-
transfersFrom TicketTransfer[]
|
|
1120
|
-
transfersTo TicketTransfer[]
|
|
1121
|
-
ticketsOnWaitlist Ticket[]
|
|
1117
|
+
ticketsISent Ticket[] @relation("TicketsISent")
|
|
1118
|
+
ticketsIOwn Ticket[] @relation("TicketsIOwn")
|
|
1119
|
+
transfersFrom TicketTransfer[] @relation("TransfersFrom")
|
|
1120
|
+
transfersTo TicketTransfer[] @relation("TransfersTo")
|
|
1121
|
+
ticketsOnWaitlist Ticket[] @relation("TicketsOnWaitlist")
|
|
1122
1122
|
ticketTiersWaitListsIveJoined TicketTier[]
|
|
1123
1123
|
reviews Review[]
|
|
1124
1124
|
sponsorships SponsoredEvent[]
|
|
@@ -1142,23 +1142,24 @@ model User {
|
|
|
1142
1142
|
city String?
|
|
1143
1143
|
state String?
|
|
1144
1144
|
zipCode String?
|
|
1145
|
-
country String?
|
|
1145
|
+
country String? @default("US")
|
|
1146
1146
|
phone String?
|
|
1147
1147
|
socialMediaProfiles SocialMediaProfile[]
|
|
1148
|
-
documentIDId String?
|
|
1148
|
+
documentIDId String? @unique
|
|
1149
1149
|
documentID DocumentID?
|
|
1150
1150
|
comment BashComment[]
|
|
1151
1151
|
associatedBashes AssociatedBash[]
|
|
1152
1152
|
associatedServices AssociatedService[]
|
|
1153
|
-
invitationsCreatedByMe Invitation[]
|
|
1154
|
-
invitationsSentToMe Invitation[]
|
|
1155
|
-
notificationsCreatedByMe Notification[]
|
|
1156
|
-
remindersCreatedByMe Reminder[]
|
|
1157
|
-
remindersAssignedToMe Reminder[]
|
|
1158
|
-
eventTasksAssignedToMe EventTask[]
|
|
1153
|
+
invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
|
|
1154
|
+
invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
|
|
1155
|
+
notificationsCreatedByMe Notification[] @relation("NotificationsCreatedByMe")
|
|
1156
|
+
remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
|
|
1157
|
+
remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
|
|
1158
|
+
eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
|
|
1159
1159
|
contacts Contact[]
|
|
1160
|
-
vouchersRedeemed Voucher[]
|
|
1161
|
-
|
|
1160
|
+
vouchersRedeemed Voucher[] @relation("UserVouchersRedeemed")
|
|
1161
|
+
pushNotificationTokens PushNotificationToken[]
|
|
1162
|
+
contactLists ContactList[] @relation("UserContactLists")
|
|
1162
1163
|
contactlist ContactList[]
|
|
1163
1164
|
|
|
1164
1165
|
bashEventPromoCodesIUsed BashEventPromoCode[]
|
|
@@ -3702,3 +3703,19 @@ enum VoucherStatus {
|
|
|
3702
3703
|
Used
|
|
3703
3704
|
Cancelled
|
|
3704
3705
|
}
|
|
3706
|
+
|
|
3707
|
+
model PushNotificationToken {
|
|
3708
|
+
id String @id @default(cuid())
|
|
3709
|
+
userId String
|
|
3710
|
+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
3711
|
+
token String @unique
|
|
3712
|
+
platform String // 'web', 'ios', 'android'
|
|
3713
|
+
userAgent String?
|
|
3714
|
+
isActive Boolean @default(true)
|
|
3715
|
+
createdAt DateTime @default(now())
|
|
3716
|
+
updatedAt DateTime @updatedAt
|
|
3717
|
+
|
|
3718
|
+
@@unique([userId, platform])
|
|
3719
|
+
@@index([userId])
|
|
3720
|
+
@@index([isActive])
|
|
3721
|
+
}
|