@bash-app/bash-common 27.8.0 → 28.0.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 +2 -2
- package/prisma/schema.prisma +169 -434
- package/src/extendedSchemas.ts +29 -53
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bash-app/bash-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.0",
|
|
4
4
|
"description": "Common data and scripts to use on the frontend and backend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
"tslib": "^2.6.2",
|
|
44
44
|
"typescript": "^5.2.2"
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
package/prisma/schema.prisma
CHANGED
|
@@ -17,7 +17,7 @@ model Club {
|
|
|
17
17
|
street String
|
|
18
18
|
userId String
|
|
19
19
|
price Int?
|
|
20
|
-
events BashEvent[]
|
|
20
|
+
events BashEvent[]
|
|
21
21
|
members ClubMember[]
|
|
22
22
|
admin ClubAdmin[]
|
|
23
23
|
}
|
|
@@ -235,7 +235,7 @@ model BashEvent {
|
|
|
235
235
|
subtitle String?
|
|
236
236
|
isFeatured Boolean?
|
|
237
237
|
isTrending Boolean?
|
|
238
|
-
stripeAccount StripeAccount[]
|
|
238
|
+
// stripeAccount StripeAccount[]
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
model Checkout {
|
|
@@ -543,18 +543,18 @@ model CustomBashEventType {
|
|
|
543
543
|
model AmountOfGuests {
|
|
544
544
|
id String @id @default(cuid())
|
|
545
545
|
bashEvent BashEvent?
|
|
546
|
-
venue Venue?
|
|
547
546
|
exhibitor Exhibitor?
|
|
548
547
|
eventService EventService?
|
|
549
548
|
entertainmentService EntertainmentService?
|
|
550
549
|
vendor Vendor?
|
|
551
550
|
sponsor Sponsor?
|
|
552
|
-
organization Organization?
|
|
553
551
|
|
|
554
552
|
minimum Int? @default(10)
|
|
555
553
|
ideal Int? @default(35)
|
|
556
554
|
showMinimumGuests Boolean @default(true)
|
|
557
555
|
showIdealGuests Boolean @default(true)
|
|
556
|
+
venueId String?
|
|
557
|
+
organizationId String?
|
|
558
558
|
}
|
|
559
559
|
|
|
560
560
|
enum Privacy {
|
|
@@ -564,21 +564,15 @@ enum Privacy {
|
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
model TargetAudience {
|
|
567
|
-
id
|
|
568
|
-
ageRange
|
|
569
|
-
gender
|
|
570
|
-
occupation
|
|
571
|
-
education
|
|
572
|
-
showOnDetailPage
|
|
573
|
-
bashEvent
|
|
574
|
-
service
|
|
575
|
-
|
|
576
|
-
vendor Vendor?
|
|
577
|
-
eventService EventService?
|
|
578
|
-
entertainmentService EntertainmentService?
|
|
579
|
-
exhibitor Exhibitor?
|
|
580
|
-
sponsor Sponsor?
|
|
581
|
-
organization Organization?
|
|
567
|
+
id String @id @default(cuid())
|
|
568
|
+
ageRange AgeRange @default(NoPreference)
|
|
569
|
+
gender Gender @default(NoPreference)
|
|
570
|
+
occupation Occupation @default(NoPreference)
|
|
571
|
+
education Education @default(NoPreference)
|
|
572
|
+
showOnDetailPage Boolean @default(true)
|
|
573
|
+
bashEvent BashEvent?
|
|
574
|
+
service Service? @relation(fields: [serviceId], references: [id]) //Check: Can a service have multiple target audiences?
|
|
575
|
+
serviceId String?
|
|
582
576
|
}
|
|
583
577
|
|
|
584
578
|
enum AgeRange {
|
|
@@ -691,29 +685,15 @@ model Link {
|
|
|
691
685
|
}
|
|
692
686
|
|
|
693
687
|
model Media {
|
|
694
|
-
id String
|
|
695
|
-
url String
|
|
688
|
+
id String @id @default(cuid())
|
|
689
|
+
url String @unique
|
|
696
690
|
type MediaType
|
|
697
691
|
mimetype String?
|
|
698
692
|
bashEventsReferencingMe BashEvent[]
|
|
699
693
|
sponsoredEventsReferencingMe SponsoredEvent[]
|
|
700
694
|
serviceReferencingMe Service[]
|
|
701
|
-
|
|
702
|
-
eventServiceId String?
|
|
703
|
-
entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
|
|
704
|
-
entertainmentServiceId String?
|
|
705
|
-
vendor Vendor? @relation(fields: [vendorId], references: [id])
|
|
706
|
-
vendorId String?
|
|
707
|
-
exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
|
|
708
|
-
exhibitorId String?
|
|
709
|
-
sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
|
|
710
|
-
sponsorId String?
|
|
711
|
-
venue Venue? @relation(fields: [venueId], references: [id])
|
|
712
|
-
venueId String?
|
|
713
|
-
organization Organization? @relation(fields: [organizationId], references: [id])
|
|
714
|
-
organizationId String?
|
|
695
|
+
VolunteerService VolunteerService? @relation(fields: [volunteerServiceId], references: [id])
|
|
715
696
|
volunteerServiceId String?
|
|
716
|
-
volunteerService VolunteerService? @relation("VolunteerServiceMedia", fields: [volunteerServiceId], references: [id])
|
|
717
697
|
}
|
|
718
698
|
|
|
719
699
|
enum MediaType {
|
|
@@ -791,12 +771,12 @@ enum SponsorType {
|
|
|
791
771
|
}
|
|
792
772
|
|
|
793
773
|
model User {
|
|
794
|
-
id String
|
|
795
|
-
email String
|
|
796
|
-
createdOn DateTime
|
|
797
|
-
stripeCustomerId String?
|
|
798
|
-
stripeAccountId String?
|
|
799
|
-
isSuperUser Boolean
|
|
774
|
+
id String @id @default(cuid())
|
|
775
|
+
email String @unique
|
|
776
|
+
createdOn DateTime @default(now())
|
|
777
|
+
stripeCustomerId String? @unique
|
|
778
|
+
stripeAccountId String? @unique
|
|
779
|
+
isSuperUser Boolean @default(false)
|
|
800
780
|
googleCalendarAccess String?
|
|
801
781
|
givenName String?
|
|
802
782
|
familyName String?
|
|
@@ -807,11 +787,11 @@ model User {
|
|
|
807
787
|
dob DateTime?
|
|
808
788
|
gender Gender?
|
|
809
789
|
sex Sex?
|
|
810
|
-
roles UserRole[]
|
|
811
|
-
createdServices Service[]
|
|
812
|
-
createdEvents BashEvent[]
|
|
813
|
-
ticketsISent Ticket[]
|
|
814
|
-
ticketsIOwn Ticket[]
|
|
790
|
+
roles UserRole[] @default([User])
|
|
791
|
+
createdServices Service[] @relation("CreatedService") //check: why this and
|
|
792
|
+
createdEvents BashEvent[] @relation("CreatedEvent")
|
|
793
|
+
ticketsISent Ticket[] @relation("TicketsISent")
|
|
794
|
+
ticketsIOwn Ticket[] @relation("TicketsIOwn")
|
|
815
795
|
reviews Review[]
|
|
816
796
|
sponsorships SponsoredEvent[]
|
|
817
797
|
investments Investment[]
|
|
@@ -834,18 +814,18 @@ model User {
|
|
|
834
814
|
city String?
|
|
835
815
|
state String?
|
|
836
816
|
zipCode String?
|
|
837
|
-
country String?
|
|
817
|
+
country String? @default("US")
|
|
838
818
|
phone String?
|
|
839
|
-
documentIDId String?
|
|
819
|
+
documentIDId String? @unique
|
|
840
820
|
documentID DocumentID?
|
|
841
821
|
comment BashComment[]
|
|
842
822
|
associatedBashes AssociatedBash[]
|
|
843
|
-
invitationsCreatedByMe Invitation[]
|
|
844
|
-
invitationsSentToMe Invitation[]
|
|
845
|
-
notificationsCreatedByMe BashNotification[]
|
|
846
|
-
remindersCreatedByMe Reminder[]
|
|
847
|
-
remindersAssignedToMe Reminder[]
|
|
848
|
-
eventTasksAssignedToMe EventTask[]
|
|
823
|
+
invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
|
|
824
|
+
invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
|
|
825
|
+
notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
|
|
826
|
+
remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
|
|
827
|
+
remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
|
|
828
|
+
eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
|
|
849
829
|
checkouts Checkout[]
|
|
850
830
|
ticketTiersWaitListsIveJoined TicketTier[]
|
|
851
831
|
contacts Contact[]
|
|
@@ -854,14 +834,7 @@ model User {
|
|
|
854
834
|
bookingForMe Booking[]
|
|
855
835
|
userSubscription UserSubscription?
|
|
856
836
|
serviceSubcriptions ServiceSubscription[]
|
|
857
|
-
|
|
858
|
-
eventService EventService[]
|
|
859
|
-
entertainmentService EntertainmentService[]
|
|
860
|
-
vendor Vendor[]
|
|
861
|
-
exhibitor Exhibitor[]
|
|
862
|
-
sponsor Sponsor[]
|
|
863
|
-
venue Venue[]
|
|
864
|
-
organization Organization[]
|
|
837
|
+
VolunteerService VolunteerService[]
|
|
865
838
|
}
|
|
866
839
|
|
|
867
840
|
model Contact {
|
|
@@ -893,390 +866,177 @@ model AssociatedBash {
|
|
|
893
866
|
@@unique([ownerEmail, bashEventId])
|
|
894
867
|
}
|
|
895
868
|
|
|
869
|
+
//Common data for all services; 1-1 relation between each individual service model such as Venue
|
|
896
870
|
model Service {
|
|
897
|
-
id
|
|
898
|
-
// ownerId String
|
|
899
|
-
// owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
|
|
900
|
-
// stripeServiceCustomerId String? @unique
|
|
901
|
-
stripeBusinessId String @unique
|
|
902
|
-
// stripeBusinessType String @default("Individual")
|
|
903
|
-
serviceType ServiceTypes
|
|
904
|
-
creatorId String
|
|
905
|
-
creator User @relation("CreatedService", fields: [creatorId], references: [id], onDelete: Cascade)
|
|
906
|
-
dateCreated DateTime @default(now())
|
|
907
|
-
email String
|
|
908
|
-
place String?
|
|
909
|
-
street String
|
|
910
|
-
city String
|
|
911
|
-
state String
|
|
912
|
-
zipCode String
|
|
913
|
-
country String
|
|
914
|
-
phone String
|
|
915
|
-
name String @default("New Service")
|
|
916
|
-
coverPhoto String?
|
|
917
|
-
agreedToAgreement Boolean?
|
|
918
|
-
media Media[]
|
|
919
|
-
customServiceTag String[]
|
|
920
|
-
yearsOfExperince YearsOfExperience @default(LessThanOneYear)
|
|
921
|
-
serviceLinks ServiceLink[]
|
|
922
|
-
description String?
|
|
923
|
-
canContact Boolean?
|
|
924
|
-
// musicGenre MusicGenreType?
|
|
925
|
-
visibility VisibilityPreference @default(Public)
|
|
926
|
-
// bashesInterestedIn BashEventType[]
|
|
927
|
-
status ServiceStatus @default(Draft)
|
|
928
|
-
venues Venue[]
|
|
929
|
-
targetAudienceId String? @unique
|
|
930
|
-
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
931
|
-
// volunteerService VolunteerService?
|
|
932
|
-
volunteerServices VolunteerService[]
|
|
933
|
-
eventServices EventService[]
|
|
934
|
-
entertainmentServices EntertainmentService[]
|
|
935
|
-
vendors Vendor[]
|
|
936
|
-
exhibitor Exhibitor[]
|
|
937
|
-
sponsors Sponsor[]
|
|
938
|
-
organizations Organization[]
|
|
939
|
-
trademark Boolean?
|
|
940
|
-
manager Boolean?
|
|
941
|
-
dba String?
|
|
942
|
-
contactPerson String?
|
|
943
|
-
contactPhone String?
|
|
944
|
-
contactEmail String?
|
|
945
|
-
businessPhone String?
|
|
946
|
-
bookings Booking[]
|
|
947
|
-
stripeAccount StripeAccount[]
|
|
871
|
+
id String @id @default(cuid())
|
|
948
872
|
|
|
949
|
-
|
|
950
|
-
|
|
873
|
+
serviceType ServiceTypes
|
|
874
|
+
serviceStatus ServiceStatus @default(Draft)
|
|
875
|
+
|
|
876
|
+
ownerId String?
|
|
877
|
+
owner User? @relation("CreatedService", fields: [ownerId], references: [id])
|
|
878
|
+
|
|
879
|
+
createdAt DateTime @default(now())
|
|
880
|
+
updatedAt DateTime @updatedAt
|
|
881
|
+
|
|
882
|
+
serviceName String?
|
|
883
|
+
|
|
884
|
+
//this is not the business info but that which is associated with the service
|
|
885
|
+
email String?
|
|
886
|
+
street String?
|
|
887
|
+
city String?
|
|
888
|
+
state String?
|
|
889
|
+
zipCode String?
|
|
890
|
+
country String?
|
|
891
|
+
phone String?
|
|
892
|
+
description String?
|
|
893
|
+
|
|
894
|
+
additionalInfo String?
|
|
895
|
+
coverPhoto String?
|
|
896
|
+
|
|
897
|
+
mission String?
|
|
898
|
+
communityInvolvement String?
|
|
899
|
+
emergencyContact String?
|
|
900
|
+
contactDetails String?
|
|
901
|
+
rates String?
|
|
902
|
+
cancellationPolicy String?
|
|
903
|
+
refundPolicy String?
|
|
904
|
+
insurancePolicy String?
|
|
905
|
+
|
|
906
|
+
stripeAccountId String?
|
|
907
|
+
stripeAccount StripeAccount? @relation(fields: [stripeAccountId], references: [id], onDelete: Cascade)
|
|
908
|
+
|
|
909
|
+
visibility VisibilityPreference @default(Public)
|
|
910
|
+
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
911
|
+
|
|
912
|
+
bashesInterestedIn BashEventType[]
|
|
913
|
+
bookings Booking[]
|
|
914
|
+
targetAudiences TargetAudience[]
|
|
915
|
+
media Media[]
|
|
916
|
+
ServiceLink ServiceLink[]
|
|
917
|
+
|
|
918
|
+
eventService EventService?
|
|
919
|
+
entertainmentService EntertainmentService?
|
|
920
|
+
vendor Vendor?
|
|
921
|
+
exhibitor Exhibitor?
|
|
922
|
+
sponsor Sponsor?
|
|
923
|
+
venue Venue?
|
|
924
|
+
organization Organization?
|
|
951
925
|
}
|
|
952
926
|
|
|
953
927
|
model StripeAccount {
|
|
954
|
-
id String
|
|
955
|
-
stripeAccountId String
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
updatedAt DateTime @updatedAt
|
|
960
|
-
service Service? @relation(fields: [entityId], references: [id])
|
|
961
|
-
bashEventId String?
|
|
962
|
-
bashEvent BashEvent? @relation(fields: [bashEventId], references: [id])
|
|
928
|
+
id String @id @default(cuid())
|
|
929
|
+
stripeAccountId String
|
|
930
|
+
createdAt DateTime @default(now())
|
|
931
|
+
updatedAt DateTime @updatedAt
|
|
932
|
+
service Service[]
|
|
963
933
|
}
|
|
964
934
|
|
|
965
935
|
model VolunteerService {
|
|
966
936
|
id String @id @default(cuid())
|
|
967
|
-
|
|
968
|
-
service Service? @relation(fields: [serviceId], references: [id])
|
|
937
|
+
// service Service
|
|
969
938
|
userId String?
|
|
970
939
|
user User? @relation(fields: [userId], references: [id])
|
|
971
940
|
serviceRangeId String?
|
|
972
941
|
serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
|
|
973
|
-
media Media[] @relation("VolunteerServiceMedia")
|
|
974
942
|
links Link[] @relation("VolunteerServiceLinks")
|
|
975
943
|
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
976
944
|
fullName String?
|
|
977
945
|
address String?
|
|
978
946
|
email String?
|
|
979
947
|
phone String?
|
|
980
|
-
agreedToAgreement Boolean?
|
|
948
|
+
agreedToAgreement Boolean? @default(false)
|
|
981
949
|
description String?
|
|
982
950
|
status VolunteerServiceStatus?
|
|
951
|
+
Media Media[]
|
|
983
952
|
}
|
|
984
953
|
|
|
985
954
|
model EventService {
|
|
986
|
-
id
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
state String
|
|
998
|
-
zipCode String
|
|
999
|
-
country String
|
|
1000
|
-
phone String
|
|
1001
|
-
coverPhoto String?
|
|
1002
|
-
media Media[]
|
|
1003
|
-
visibility VisibilityPreference @default(Public)
|
|
1004
|
-
status ServiceStatus @default(Draft)
|
|
1005
|
-
yearsOfExperience YearsOfExperience
|
|
1006
|
-
description String?
|
|
1007
|
-
crowdSizeId String? @unique
|
|
1008
|
-
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
1009
|
-
additionalInfo String?
|
|
1010
|
-
goodsOrServices String[]
|
|
1011
|
-
menuItems String?
|
|
1012
|
-
venueTypes String[]
|
|
1013
|
-
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
1014
|
-
mission String?
|
|
1015
|
-
communityInvolvement String?
|
|
1016
|
-
emergencyContact String?
|
|
1017
|
-
contactDetails String?
|
|
1018
|
-
rates String?
|
|
1019
|
-
cancellationPolicy String?
|
|
1020
|
-
refundPolicy String?
|
|
1021
|
-
insurancePolicy String?
|
|
1022
|
-
bashesInterestedIn BashEventType[]
|
|
1023
|
-
links ServiceLink[]
|
|
1024
|
-
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
1025
|
-
targetAudienceId String? @unique
|
|
955
|
+
id String @id @default(cuid())
|
|
956
|
+
serviceId String @unique
|
|
957
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
958
|
+
eventServiceTypes EventServiceType[]
|
|
959
|
+
eventServiceSubType String?
|
|
960
|
+
yearsOfExperience YearsOfExperience
|
|
961
|
+
crowdSizeId String? @unique
|
|
962
|
+
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
963
|
+
goodsOrServices String[]
|
|
964
|
+
menuItems String?
|
|
965
|
+
venueTypes String[]
|
|
1026
966
|
}
|
|
1027
967
|
|
|
1028
968
|
model EntertainmentService {
|
|
1029
969
|
id String @id @default(cuid())
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
service Service @relation(fields: [serviceId], references: [id])
|
|
1033
|
-
serviceId String
|
|
1034
|
-
entertainmentServiceName String
|
|
970
|
+
serviceId String @unique
|
|
971
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1035
972
|
entertainmentServiceTypes EntertainmentServiceType[]
|
|
1036
973
|
entertainmentServiceSubType String?
|
|
1037
974
|
genre MusicGenreType?
|
|
1038
|
-
email String
|
|
1039
|
-
street String
|
|
1040
|
-
city String
|
|
1041
|
-
state String
|
|
1042
|
-
zipCode String
|
|
1043
|
-
country String
|
|
1044
|
-
phone String
|
|
1045
|
-
coverPhoto String?
|
|
1046
|
-
media Media[]
|
|
1047
|
-
visibility VisibilityPreference @default(Public)
|
|
1048
|
-
status ServiceStatus @default(Draft)
|
|
1049
975
|
yearsOfExperience YearsOfExperience
|
|
1050
|
-
description String?
|
|
1051
976
|
crowdSizeId String? @unique
|
|
1052
977
|
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
1053
|
-
additionalInfo String?
|
|
1054
978
|
goodsOrServices String[]
|
|
1055
979
|
venueTypes String[]
|
|
1056
|
-
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
1057
|
-
mission String?
|
|
1058
|
-
communityInvolvement String?
|
|
1059
|
-
emergencyContact String?
|
|
1060
|
-
contactDetails String?
|
|
1061
|
-
rates String?
|
|
1062
|
-
cancellationPolicy String?
|
|
1063
|
-
refundPolicy String?
|
|
1064
|
-
insurancePolicy String?
|
|
1065
|
-
bashesInterestedIn BashEventType[]
|
|
1066
|
-
links ServiceLink[]
|
|
1067
|
-
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
1068
|
-
targetAudienceId String? @unique
|
|
1069
980
|
}
|
|
1070
981
|
|
|
1071
982
|
model Vendor {
|
|
1072
|
-
id
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
state String
|
|
1082
|
-
zipCode String
|
|
1083
|
-
country String
|
|
1084
|
-
phone String
|
|
1085
|
-
coverPhoto String?
|
|
1086
|
-
media Media[]
|
|
1087
|
-
visibility VisibilityPreference @default(Public)
|
|
1088
|
-
status ServiceStatus @default(Draft)
|
|
1089
|
-
yearsOfExperience YearsOfExperience
|
|
1090
|
-
description String?
|
|
1091
|
-
crowdSizeId String? @unique
|
|
1092
|
-
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
1093
|
-
additionalInfo String?
|
|
1094
|
-
goodsOrServices String[]
|
|
1095
|
-
menuItems String?
|
|
1096
|
-
venueTypes String[]
|
|
1097
|
-
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
1098
|
-
mission String?
|
|
1099
|
-
communityInvolvement String?
|
|
1100
|
-
emergencyContact String?
|
|
1101
|
-
contactDetails String?
|
|
1102
|
-
rates String?
|
|
1103
|
-
cancellationPolicy String?
|
|
1104
|
-
refundPolicy String?
|
|
1105
|
-
insurancePolicy String?
|
|
1106
|
-
bashesInterestedIn BashEventType[]
|
|
1107
|
-
links ServiceLink[]
|
|
1108
|
-
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
1109
|
-
targetAudienceId String? @unique
|
|
983
|
+
id String @id @default(cuid())
|
|
984
|
+
serviceId String @unique
|
|
985
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
986
|
+
yearsOfExperience YearsOfExperience
|
|
987
|
+
crowdSizeId String? @unique
|
|
988
|
+
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
989
|
+
goodsOrServices String[]
|
|
990
|
+
menuItems String?
|
|
991
|
+
venueTypes String[]
|
|
1110
992
|
}
|
|
1111
993
|
|
|
1112
994
|
model Exhibitor {
|
|
1113
|
-
id
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
city String
|
|
1122
|
-
state String
|
|
1123
|
-
zipCode String
|
|
1124
|
-
country String
|
|
1125
|
-
phone String
|
|
1126
|
-
coverPhoto String?
|
|
1127
|
-
media Media[]
|
|
1128
|
-
visibility VisibilityPreference @default(Public)
|
|
1129
|
-
yearsOfExperience YearsOfExperience
|
|
1130
|
-
description String?
|
|
1131
|
-
crowdSizeId String? @unique
|
|
1132
|
-
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
1133
|
-
targetAudienceId String? @unique
|
|
1134
|
-
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
1135
|
-
additionalInfo String?
|
|
1136
|
-
goodsOrServices String[]
|
|
1137
|
-
venueTypes String[]
|
|
1138
|
-
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
1139
|
-
status ServiceStatus @default(Draft)
|
|
1140
|
-
mission String?
|
|
1141
|
-
communityInvolvement String?
|
|
1142
|
-
emergencyContact String?
|
|
1143
|
-
contactDetails String?
|
|
1144
|
-
rates String?
|
|
1145
|
-
cancellationPolicy String?
|
|
1146
|
-
refundPolicy String?
|
|
1147
|
-
insurancePolicy String?
|
|
1148
|
-
bashesInterestedIn BashEventType[]
|
|
1149
|
-
links ServiceLink[]
|
|
995
|
+
id String @id @default(cuid())
|
|
996
|
+
serviceId String @unique
|
|
997
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
998
|
+
yearsOfExperience YearsOfExperience
|
|
999
|
+
crowdSizeId String? @unique
|
|
1000
|
+
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
|
|
1001
|
+
goodsOrServices String[]
|
|
1002
|
+
venueTypes String[]
|
|
1150
1003
|
}
|
|
1151
1004
|
|
|
1152
1005
|
model Sponsor {
|
|
1153
|
-
id
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
city String
|
|
1162
|
-
state String
|
|
1163
|
-
zipCode String
|
|
1164
|
-
country String
|
|
1165
|
-
phone String
|
|
1166
|
-
coverPhoto String?
|
|
1167
|
-
media Media[]
|
|
1168
|
-
visibility VisibilityPreference @default(Public)
|
|
1169
|
-
status ServiceStatus @default(Draft)
|
|
1170
|
-
yearsOfExperience YearsOfExperience
|
|
1171
|
-
description String?
|
|
1172
|
-
crowdSizeId String? @unique
|
|
1173
|
-
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
|
|
1174
|
-
additionalInfo String?
|
|
1175
|
-
goodsOrServices String[]
|
|
1176
|
-
menuItems String?
|
|
1177
|
-
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
1178
|
-
mission String?
|
|
1179
|
-
communityInvolvement String?
|
|
1180
|
-
emergencyContact String?
|
|
1181
|
-
contactDetails String?
|
|
1182
|
-
rates String?
|
|
1183
|
-
cancellationPolicy String?
|
|
1184
|
-
refundPolicy String?
|
|
1185
|
-
insurancePolicy String?
|
|
1186
|
-
bashesInterestedIn BashEventType[]
|
|
1187
|
-
links ServiceLink[]
|
|
1188
|
-
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
1189
|
-
targetAudienceId String? @unique
|
|
1006
|
+
id String @id @default(cuid())
|
|
1007
|
+
serviceId String @unique
|
|
1008
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1009
|
+
yearsOfExperience YearsOfExperience
|
|
1010
|
+
crowdSizeId String? @unique
|
|
1011
|
+
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
|
|
1012
|
+
goodsOrServices String[]
|
|
1013
|
+
menuItems String?
|
|
1190
1014
|
}
|
|
1191
1015
|
|
|
1192
1016
|
model Venue {
|
|
1193
|
-
id
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
country String?
|
|
1208
|
-
phone String?
|
|
1209
|
-
coverPhoto String?
|
|
1210
|
-
media Media[]
|
|
1211
|
-
visibility VisibilityPreference @default(Public)
|
|
1212
|
-
status ServiceStatus @default(Draft)
|
|
1213
|
-
yearsInBusiness YearsOfExperience @default(LessThanOneYear)
|
|
1214
|
-
description String?
|
|
1215
|
-
amenities String[]
|
|
1216
|
-
menuItems String?
|
|
1217
|
-
additionalInfo String?
|
|
1218
|
-
features String[]
|
|
1219
|
-
venueTypes String[]
|
|
1220
|
-
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
1221
|
-
mission String?
|
|
1222
|
-
pitch String?
|
|
1223
|
-
communityInvolvement String?
|
|
1224
|
-
emergencyContact String?
|
|
1225
|
-
contactDetails String?
|
|
1226
|
-
rates String?
|
|
1227
|
-
cancellationPolicy String?
|
|
1228
|
-
refundPolicy String?
|
|
1229
|
-
safetyPolicy String?
|
|
1230
|
-
insurancePolicy String?
|
|
1231
|
-
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
1232
|
-
targetAudienceId String? @unique
|
|
1233
|
-
bashesInterestedIn BashEventType[]
|
|
1234
|
-
links ServiceLink[]
|
|
1235
|
-
capacity Int?
|
|
1236
|
-
amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
|
|
1237
|
-
amountOfGuestsId String? @unique
|
|
1238
|
-
trademark Boolean?
|
|
1239
|
-
manager Boolean?
|
|
1017
|
+
id String @id @default(cuid())
|
|
1018
|
+
serviceId String @unique
|
|
1019
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1020
|
+
// serviceConnectionId String? //Check: ?
|
|
1021
|
+
// serviceConnection String?
|
|
1022
|
+
yearsInBusiness YearsOfExperience @default(LessThanOneYear)
|
|
1023
|
+
amenities String[]
|
|
1024
|
+
menuItems String?
|
|
1025
|
+
features String[]
|
|
1026
|
+
venueTypes String[]
|
|
1027
|
+
pitch String?
|
|
1028
|
+
capacity Int?
|
|
1029
|
+
trademark Boolean?
|
|
1030
|
+
manager Boolean?
|
|
1240
1031
|
}
|
|
1241
1032
|
|
|
1242
1033
|
model Organization {
|
|
1243
|
-
id
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
organizationType OrganizationType[]
|
|
1250
|
-
email String
|
|
1251
|
-
street String
|
|
1252
|
-
city String
|
|
1253
|
-
state String
|
|
1254
|
-
zipCode String
|
|
1255
|
-
country String
|
|
1256
|
-
phone String
|
|
1257
|
-
coverPhoto String?
|
|
1258
|
-
media Media[]
|
|
1259
|
-
visibility VisibilityPreference @default(Public)
|
|
1260
|
-
status ServiceStatus @default(Draft)
|
|
1261
|
-
description String?
|
|
1262
|
-
crowdSizeId String? @unique
|
|
1263
|
-
crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
|
|
1264
|
-
additionalInfo String?
|
|
1265
|
-
goodsOrServices String[]
|
|
1266
|
-
venueTypes String[]
|
|
1267
|
-
availableDateTimes Availability[] @relation("AvailableDateTimes")
|
|
1268
|
-
mission String?
|
|
1269
|
-
communityInvolvement String?
|
|
1270
|
-
emergencyContact String?
|
|
1271
|
-
contactDetails String?
|
|
1272
|
-
rates String?
|
|
1273
|
-
cancellationPolicy String?
|
|
1274
|
-
refundPolicy String?
|
|
1275
|
-
insurancePolicy String?
|
|
1276
|
-
bashesInterestedIn BashEventType[]
|
|
1277
|
-
links ServiceLink[]
|
|
1278
|
-
targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
|
|
1279
|
-
targetAudienceId String? @unique
|
|
1034
|
+
id String @id @default(cuid())
|
|
1035
|
+
serviceId String @unique
|
|
1036
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1037
|
+
organizationType OrganizationType[]
|
|
1038
|
+
goodsOrServices String[]
|
|
1039
|
+
venueTypes String[]
|
|
1280
1040
|
}
|
|
1281
1041
|
|
|
1282
1042
|
enum EventServiceType {
|
|
@@ -1355,25 +1115,14 @@ model ServiceRange {
|
|
|
1355
1115
|
}
|
|
1356
1116
|
|
|
1357
1117
|
model Availability {
|
|
1358
|
-
id
|
|
1359
|
-
startDateTime
|
|
1360
|
-
endDateTime
|
|
1361
|
-
venueId
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
entertainmentService EntertainmentService? @relation("AvailableDateTimes", fields: [entertainmentServiceId], references: [id])
|
|
1367
|
-
vendorId String?
|
|
1368
|
-
vendor Vendor? @relation("AvailableDateTimes", fields: [vendorId], references: [id])
|
|
1369
|
-
exhibitorId String?
|
|
1370
|
-
exhibitor Exhibitor? @relation("AvailableDateTimes", fields: [exhibitorId], references: [id])
|
|
1371
|
-
sponsorId String?
|
|
1372
|
-
sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
|
|
1373
|
-
organizationId String?
|
|
1374
|
-
organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
|
|
1375
|
-
volunteerServiceId String?
|
|
1376
|
-
volunteerService VolunteerService? @relation("AvailableDateTimes", fields: [volunteerServiceId], references: [id])
|
|
1118
|
+
id String @id @default(cuid())
|
|
1119
|
+
startDateTime String
|
|
1120
|
+
endDateTime String
|
|
1121
|
+
venueId String?
|
|
1122
|
+
serviceId String?
|
|
1123
|
+
service Service? @relation("AvailableDateTimes", fields: [serviceId], references: [id])
|
|
1124
|
+
volunteerServiceId String?
|
|
1125
|
+
volunteerService VolunteerService? @relation("AvailableDateTimes", fields: [volunteerServiceId], references: [id])
|
|
1377
1126
|
}
|
|
1378
1127
|
|
|
1379
1128
|
enum VisibilityPreference {
|
|
@@ -1445,25 +1194,11 @@ model VerificationToken {
|
|
|
1445
1194
|
}
|
|
1446
1195
|
|
|
1447
1196
|
model ServiceLink {
|
|
1448
|
-
id
|
|
1449
|
-
serviceId
|
|
1450
|
-
service
|
|
1451
|
-
linkId
|
|
1452
|
-
link
|
|
1453
|
-
eventService EventService? @relation(fields: [eventServiceId], references: [id])
|
|
1454
|
-
eventServiceId String?
|
|
1455
|
-
entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
|
|
1456
|
-
entertainmentServiceId String?
|
|
1457
|
-
vendor Vendor? @relation(fields: [vendorId], references: [id])
|
|
1458
|
-
vendorId String?
|
|
1459
|
-
exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
|
|
1460
|
-
exhibitorId String?
|
|
1461
|
-
sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
|
|
1462
|
-
sponsorId String?
|
|
1463
|
-
venue Venue? @relation(fields: [venueId], references: [id])
|
|
1464
|
-
venueId String?
|
|
1465
|
-
organization Organization? @relation(fields: [organizationId], references: [id])
|
|
1466
|
-
organizationId String?
|
|
1197
|
+
id String @id @default(cuid())
|
|
1198
|
+
serviceId String @unique
|
|
1199
|
+
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
|
1200
|
+
linkId String
|
|
1201
|
+
link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
|
|
1467
1202
|
|
|
1468
1203
|
@@index([serviceId])
|
|
1469
1204
|
}
|
package/src/extendedSchemas.ts
CHANGED
|
@@ -21,8 +21,11 @@ import {
|
|
|
21
21
|
Organization,
|
|
22
22
|
Booking,
|
|
23
23
|
VolunteerService, Prisma, ServiceRange,
|
|
24
|
+
StripeAccount,
|
|
25
|
+
VisibilityPreference,
|
|
26
|
+
BashEventType,
|
|
24
27
|
} from "@prisma/client";
|
|
25
|
-
import {UnionFromArray} from "./definitions";
|
|
28
|
+
import { UnionFromArray } from "./definitions";
|
|
26
29
|
|
|
27
30
|
export const FRONT_END_USER_DATA_TO_SELECT = {
|
|
28
31
|
id: true,
|
|
@@ -146,72 +149,64 @@ export const EVENT_TASK_DATA_TO_INCLUDE = {
|
|
|
146
149
|
}
|
|
147
150
|
} satisfies Prisma.EventTaskInclude;
|
|
148
151
|
|
|
152
|
+
//---------------Services------------------
|
|
153
|
+
export interface ServiceExt extends Service {
|
|
154
|
+
owner: PublicUser;
|
|
155
|
+
|
|
156
|
+
stripeAccount?: StripeAccount;
|
|
157
|
+
|
|
158
|
+
visiblility?: VisibilityPreference;
|
|
159
|
+
availableDateTimes?: Availability[];
|
|
160
|
+
|
|
161
|
+
bookings?: Booking[];
|
|
162
|
+
targetAudiences?: TargetAudience[];
|
|
163
|
+
media?: Media[];
|
|
164
|
+
serviceLinks?: ServiceLinkExt[];
|
|
165
|
+
|
|
166
|
+
eventService?: EventService;
|
|
167
|
+
entertainmentService?: EntertainmentService;
|
|
168
|
+
vendor?: Vendor;
|
|
169
|
+
exhibitor?: Exhibitor;
|
|
170
|
+
sponsor?: Sponsor;
|
|
171
|
+
venue?: Venue;
|
|
172
|
+
organization?: Organization;
|
|
173
|
+
}
|
|
149
174
|
|
|
150
175
|
export interface EventServiceExt extends EventService {
|
|
151
176
|
service: Service;
|
|
152
|
-
availableDateTimes: Availability[];
|
|
153
|
-
targetAudience: TargetAudience;
|
|
154
|
-
links: ServiceLinkExt[];
|
|
155
177
|
crowdSize?: AmountOfGuests;
|
|
156
|
-
media?: Media[];
|
|
157
178
|
}
|
|
158
179
|
|
|
159
180
|
export interface EntertainmentServiceExt extends EntertainmentService {
|
|
160
181
|
service: Service;
|
|
161
|
-
availableDateTimes: Availability[];
|
|
162
|
-
targetAudience: TargetAudience;
|
|
163
|
-
links: ServiceLinkExt[];
|
|
164
182
|
crowdSize?: AmountOfGuests;
|
|
165
|
-
media?: Media[];
|
|
166
183
|
}
|
|
167
184
|
|
|
168
185
|
export interface ExhibitorExt extends Exhibitor {
|
|
169
186
|
service: Service;
|
|
170
|
-
availableDateTimes: Availability[];
|
|
171
|
-
targetAudience: TargetAudience;
|
|
172
|
-
links: ServiceLinkExt[];
|
|
173
187
|
crowdSize?: AmountOfGuests;
|
|
174
|
-
media?: Media[];
|
|
175
188
|
}
|
|
176
189
|
|
|
177
190
|
export interface SponsorExt extends Sponsor {
|
|
178
191
|
service: Service;
|
|
179
|
-
availableDateTimes: Availability[];
|
|
180
|
-
targetAudience: TargetAudience;
|
|
181
|
-
links: ServiceLinkExt[];
|
|
182
192
|
crowdSize?: AmountOfGuests;
|
|
183
|
-
media?: Media[];
|
|
184
193
|
}
|
|
185
194
|
|
|
186
195
|
export interface VendorExt extends Vendor {
|
|
187
196
|
service: Service;
|
|
188
|
-
availableDateTimes: Availability[];
|
|
189
|
-
targetAudience?: TargetAudience;
|
|
190
|
-
links: ServiceLinkExt[];
|
|
191
197
|
crowdSize?: AmountOfGuests;
|
|
192
|
-
media?: Media[];
|
|
193
198
|
}
|
|
194
199
|
|
|
195
200
|
export interface VenueExt extends Venue {
|
|
196
|
-
creator: User;
|
|
197
|
-
owner?: PublicUser;
|
|
198
201
|
service?: Service;
|
|
199
|
-
|
|
200
|
-
targetAudience?: TargetAudience | null;
|
|
201
|
-
links?: ServiceLinkExt[];
|
|
202
|
-
coverPhotoUrl?: string;
|
|
203
|
-
media?: Media[];
|
|
204
|
-
amountOfGuests?: AmountOfGuests | null;
|
|
202
|
+
crowdSize?: AmountOfGuests;
|
|
205
203
|
}
|
|
206
204
|
|
|
207
205
|
export interface OrganizationExt extends Organization {
|
|
208
206
|
service?: Service;
|
|
209
|
-
|
|
210
|
-
targetAudience: TargetAudience;
|
|
211
|
-
links: ServiceLinkExt[];
|
|
212
|
-
crowdSize?: AmountOfGuests;
|
|
213
|
-
media?: Media[];
|
|
207
|
+
amountOfGuests?: AmountOfGuests;
|
|
214
208
|
}
|
|
209
|
+
//-----------------------------------------
|
|
215
210
|
|
|
216
211
|
export interface VolunteerServiceExt extends VolunteerService {
|
|
217
212
|
service?: ServiceExt;
|
|
@@ -221,25 +216,6 @@ export interface VolunteerServiceExt extends VolunteerService {
|
|
|
221
216
|
availableDateTimes?: Availability[];
|
|
222
217
|
}
|
|
223
218
|
|
|
224
|
-
export interface ServiceExt extends Service {
|
|
225
|
-
creator: User;
|
|
226
|
-
owner?: PublicUser;
|
|
227
|
-
media?: Media[];
|
|
228
|
-
coverPhotoUrl?: string;
|
|
229
|
-
targetAudience?: TargetAudience | null;
|
|
230
|
-
volunteerService?: VolunteerService | null;
|
|
231
|
-
serviceLinks?: ServiceLinkExt[];
|
|
232
|
-
venues?: Venue[];
|
|
233
|
-
eventServices?: EventService[];
|
|
234
|
-
entertainmentServices?: EntertainmentService[];
|
|
235
|
-
vendors?: Vendor[];
|
|
236
|
-
exhibitors?: Exhibitor[];
|
|
237
|
-
sponsors?: Sponsor[];
|
|
238
|
-
organizations?: Organization[];
|
|
239
|
-
bookings?: Booking[];
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
219
|
export interface ServiceLinkExt extends ServiceLink {
|
|
244
220
|
link: Link;
|
|
245
221
|
}
|