@bash-app/bash-common 20.3.0 → 20.5.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 +93 -72
- package/src/extendedSchemas.ts +17 -4
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -244,7 +244,6 @@ model BashEvent {
|
|
|
244
244
|
subtitle String?
|
|
245
245
|
isFeatured Boolean?
|
|
246
246
|
isTrending Boolean?
|
|
247
|
-
serviceCheckout ServiceCheckout[]
|
|
248
247
|
}
|
|
249
248
|
|
|
250
249
|
model Checkout {
|
|
@@ -261,17 +260,6 @@ model Checkout {
|
|
|
261
260
|
@@index(bashEventId)
|
|
262
261
|
}
|
|
263
262
|
|
|
264
|
-
model ServiceCheckout {
|
|
265
|
-
id String @id @default(cuid())
|
|
266
|
-
ownerId String
|
|
267
|
-
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
268
|
-
bashEventId String
|
|
269
|
-
bashEvent BashEvent @relation(fields: [bashEventId], references: [id], onDelete: Cascade)
|
|
270
|
-
checkoutDateTime DateTime? @default(now())
|
|
271
|
-
tickets Ticket[]
|
|
272
|
-
stripeCheckoutSessionId String? @unique
|
|
273
|
-
}
|
|
274
|
-
|
|
275
263
|
model TicketTier {
|
|
276
264
|
id String @id @default(cuid())
|
|
277
265
|
bashEventId String
|
|
@@ -326,6 +314,37 @@ enum TicketStatus {
|
|
|
326
314
|
Missed
|
|
327
315
|
}
|
|
328
316
|
|
|
317
|
+
model ServiceCheckout {
|
|
318
|
+
id String @id @default(cuid())
|
|
319
|
+
ownerId String
|
|
320
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
321
|
+
checkoutDateTime DateTime? @default(now())
|
|
322
|
+
tickets Ticket[]
|
|
323
|
+
stripeCheckoutSessionId String? @unique
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
model UserSubscription {
|
|
327
|
+
id String @id @default(cuid())
|
|
328
|
+
ownerId String @unique
|
|
329
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
330
|
+
type UserSubscriptionType
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
enum UserSubscriptionType {
|
|
334
|
+
Free
|
|
335
|
+
Premium
|
|
336
|
+
VIP
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
model SubServiceSubcription {
|
|
340
|
+
id String @id @default(cuid())
|
|
341
|
+
ownerId String
|
|
342
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
343
|
+
type ServiceType
|
|
344
|
+
slots Int @default(0)
|
|
345
|
+
stripeSubscriptionId String?
|
|
346
|
+
}
|
|
347
|
+
|
|
329
348
|
enum BookingStatus {
|
|
330
349
|
Cancelled
|
|
331
350
|
Completed
|
|
@@ -774,11 +793,11 @@ enum SponsorType {
|
|
|
774
793
|
}
|
|
775
794
|
|
|
776
795
|
model User {
|
|
777
|
-
id String
|
|
778
|
-
email String
|
|
779
|
-
createdOn DateTime
|
|
780
|
-
stripeCustomerId String?
|
|
781
|
-
stripeAccountId String?
|
|
796
|
+
id String @id @default(cuid())
|
|
797
|
+
email String @unique
|
|
798
|
+
createdOn DateTime @default(now())
|
|
799
|
+
stripeCustomerId String? @unique
|
|
800
|
+
stripeAccountId String? @unique
|
|
782
801
|
googleCalendarAccess String?
|
|
783
802
|
givenName String?
|
|
784
803
|
familyName String?
|
|
@@ -789,11 +808,11 @@ model User {
|
|
|
789
808
|
dob DateTime?
|
|
790
809
|
gender Gender?
|
|
791
810
|
sex Sex?
|
|
792
|
-
roles UserRole[]
|
|
811
|
+
roles UserRole[] @default([User])
|
|
793
812
|
services Service[]
|
|
794
|
-
createdEvents BashEvent[]
|
|
795
|
-
ticketsISent Ticket[]
|
|
796
|
-
ticketsIOwn Ticket[]
|
|
813
|
+
createdEvents BashEvent[] @relation("CreatedEvent")
|
|
814
|
+
ticketsISent Ticket[] @relation("TicketsISent")
|
|
815
|
+
ticketsIOwn Ticket[] @relation("TicketsIOwn")
|
|
797
816
|
reviews Review[]
|
|
798
817
|
sponsorships SponsoredEvent[]
|
|
799
818
|
investments Investment[]
|
|
@@ -816,24 +835,26 @@ model User {
|
|
|
816
835
|
city String?
|
|
817
836
|
state String?
|
|
818
837
|
postalCode String?
|
|
819
|
-
country String?
|
|
838
|
+
country String? @default("US")
|
|
820
839
|
phone String?
|
|
821
|
-
documentIDId String?
|
|
840
|
+
documentIDId String? @unique
|
|
822
841
|
documentID DocumentID?
|
|
823
842
|
comment BashComment[]
|
|
824
843
|
associatedBashes AssociatedBash[]
|
|
825
|
-
invitationsCreatedByMe Invitation[]
|
|
826
|
-
invitationsSentToMe Invitation[]
|
|
827
|
-
notificationsCreatedByMe BashNotification[]
|
|
828
|
-
remindersCreatedByMe Reminder[]
|
|
829
|
-
remindersAssignedToMe Reminder[]
|
|
830
|
-
eventTasksAssignedToMe EventTask[]
|
|
844
|
+
invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
|
|
845
|
+
invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
|
|
846
|
+
notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
|
|
847
|
+
remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
|
|
848
|
+
remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
|
|
849
|
+
eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
|
|
831
850
|
checkouts Checkout[]
|
|
832
851
|
ticketTiersWaitListsIveJoined TicketTier[]
|
|
833
852
|
contacts Contact[]
|
|
834
853
|
bashEventPromoCodesIUsed BashEventPromoCode[]
|
|
835
854
|
ServiceCheckout ServiceCheckout[]
|
|
836
855
|
bookingForMe Booking[]
|
|
856
|
+
bashSubscription UserSubscription?
|
|
857
|
+
subServiceSubcriptions SubServiceSubcription[]
|
|
837
858
|
}
|
|
838
859
|
|
|
839
860
|
model Contact {
|
|
@@ -866,51 +887,51 @@ model AssociatedBash {
|
|
|
866
887
|
}
|
|
867
888
|
|
|
868
889
|
model Service {
|
|
869
|
-
id
|
|
870
|
-
ownerId
|
|
871
|
-
owner
|
|
872
|
-
dateCreated
|
|
873
|
-
email
|
|
874
|
-
location
|
|
875
|
-
streetAddress
|
|
876
|
-
city
|
|
877
|
-
state
|
|
878
|
-
postalCode
|
|
879
|
-
country
|
|
880
|
-
phone
|
|
881
|
-
name
|
|
882
|
-
coverPhoto
|
|
883
|
-
agreedToAgreement
|
|
884
|
-
media
|
|
885
|
-
serviceTypes
|
|
886
|
-
customServiceTag
|
|
887
|
-
yearsOfExperince
|
|
888
|
-
serviceLinks
|
|
889
|
-
description
|
|
890
|
-
canContact
|
|
890
|
+
id String @id @default(cuid())
|
|
891
|
+
ownerId String
|
|
892
|
+
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
893
|
+
dateCreated DateTime @default(now())
|
|
894
|
+
email String
|
|
895
|
+
location String?
|
|
896
|
+
streetAddress String
|
|
897
|
+
city String
|
|
898
|
+
state String
|
|
899
|
+
postalCode String
|
|
900
|
+
country String
|
|
901
|
+
phone String
|
|
902
|
+
name String @default("New Service")
|
|
903
|
+
coverPhoto String?
|
|
904
|
+
agreedToAgreement Boolean?
|
|
905
|
+
media Media[]
|
|
906
|
+
serviceTypes ServiceType[]
|
|
907
|
+
customServiceTag String[]
|
|
908
|
+
yearsOfExperince YearsOfExperience @default(LessThanOneYear)
|
|
909
|
+
serviceLinks ServiceLink[]
|
|
910
|
+
description String?
|
|
911
|
+
canContact Boolean?
|
|
891
912
|
// musicGenre MusicGenreType?
|
|
892
|
-
visibility
|
|
913
|
+
visibility VisibilityPreference @default(Public)
|
|
893
914
|
// bashesInterestedIn BashEventType[]
|
|
894
|
-
status
|
|
895
|
-
venues
|
|
896
|
-
serviceRangeId
|
|
897
|
-
serviceRange
|
|
898
|
-
targetAudience
|
|
899
|
-
targetAudienceId
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
exhibitor
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
trademark
|
|
907
|
-
manager
|
|
908
|
-
dba
|
|
909
|
-
contactPerson
|
|
910
|
-
contactPhone
|
|
911
|
-
contactEmail
|
|
912
|
-
businessPhone
|
|
913
|
-
bookings
|
|
915
|
+
status ServiceStatus @default(Draft)
|
|
916
|
+
venues Venue[]
|
|
917
|
+
serviceRangeId String @unique
|
|
918
|
+
serviceRange ServiceRange @relation("ServiceRange", fields: [serviceRangeId], references: [id], onDelete: Cascade)
|
|
919
|
+
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
920
|
+
targetAudienceId String? @unique
|
|
921
|
+
eventServices EventService[]
|
|
922
|
+
entertainmentServices EntertainmentService[]
|
|
923
|
+
vendors Vendor[]
|
|
924
|
+
exhibitor Exhibitor[]
|
|
925
|
+
sponsors Sponsor[]
|
|
926
|
+
organizations Organization[]
|
|
927
|
+
trademark String?
|
|
928
|
+
manager String?
|
|
929
|
+
dba String?
|
|
930
|
+
contactPerson String?
|
|
931
|
+
contactPhone String?
|
|
932
|
+
contactEmail String?
|
|
933
|
+
businessPhone String?
|
|
934
|
+
bookings Booking[]
|
|
914
935
|
|
|
915
936
|
@@index([email])
|
|
916
937
|
@@index([phone])
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
Sponsor,
|
|
22
22
|
Organization,
|
|
23
23
|
Booking,
|
|
24
|
+
ServiceType,
|
|
24
25
|
} from "@prisma/client";
|
|
25
26
|
|
|
26
27
|
export const FRONT_END_USER_DATA_TO_SELECT = {
|
|
@@ -202,6 +203,14 @@ export const VENUE_DATA_TO_INCLUDE = {
|
|
|
202
203
|
capacity: true,
|
|
203
204
|
media: true,
|
|
204
205
|
}
|
|
206
|
+
export const VENDOR_DATA_TO_INCLUDE = {
|
|
207
|
+
service: true,
|
|
208
|
+
availableDateTimes: true,
|
|
209
|
+
targetAudience: true,
|
|
210
|
+
links: true,
|
|
211
|
+
crowdSize: true,
|
|
212
|
+
media: true,
|
|
213
|
+
}
|
|
205
214
|
|
|
206
215
|
export interface ServiceExt extends Service {
|
|
207
216
|
owner: PublicUser;
|
|
@@ -212,11 +221,12 @@ export interface ServiceExt extends Service {
|
|
|
212
221
|
venues?: Venue[];
|
|
213
222
|
eventServices?: EventService[];
|
|
214
223
|
entertainmentServices?: EntertainmentService[];
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
224
|
+
vendors?: Vendor[];
|
|
225
|
+
exhibitors?: Exhibitor[];
|
|
226
|
+
sponsors?: Sponsor[];
|
|
227
|
+
organizations?: Organization[];
|
|
219
228
|
bookings?: Booking[];
|
|
229
|
+
serviceTypes: ServiceType[];
|
|
220
230
|
}
|
|
221
231
|
|
|
222
232
|
export interface ServiceLinkExt extends ServiceLink {
|
|
@@ -239,6 +249,9 @@ export const SERVICE_DATA_TO_INCLUDE = {
|
|
|
239
249
|
},
|
|
240
250
|
venues: {
|
|
241
251
|
include: VENUE_DATA_TO_INCLUDE
|
|
252
|
+
},
|
|
253
|
+
vendors: {
|
|
254
|
+
include: VENDOR_DATA_TO_INCLUDE
|
|
242
255
|
}
|
|
243
256
|
}
|
|
244
257
|
|