@bash-app/bash-common 27.8.0 → 28.1.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "27.8.0",
3
+ "version": "28.1.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
+ }
@@ -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 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?
575
- venue Venue?
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 @id @default(cuid())
695
- url String @unique
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
- EventService EventService? @relation(fields: [eventServiceId], references: [id])
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 @id @default(cuid())
795
- email String @unique
796
- createdOn DateTime @default(now())
797
- stripeCustomerId String? @unique
798
- stripeAccountId String? @unique
799
- isSuperUser Boolean @default(false)
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,12 @@ model User {
807
787
  dob DateTime?
808
788
  gender Gender?
809
789
  sex Sex?
810
- roles UserRole[] @default([User])
811
- createdServices Service[] @relation("CreatedService")
812
- createdEvents BashEvent[] @relation("CreatedEvent")
813
- ticketsISent Ticket[] @relation("TicketsISent")
814
- ticketsIOwn Ticket[] @relation("TicketsIOwn")
790
+ roles UserRole[] @default([User])
791
+ ownedServices Service[] @relation("OwnedService")
792
+ createdServices Service[] @relation("CreatedService")
793
+ createdEvents BashEvent[] @relation("CreatedEvent")
794
+ ticketsISent Ticket[] @relation("TicketsISent")
795
+ ticketsIOwn Ticket[] @relation("TicketsIOwn")
815
796
  reviews Review[]
816
797
  sponsorships SponsoredEvent[]
817
798
  investments Investment[]
@@ -834,18 +815,18 @@ model User {
834
815
  city String?
835
816
  state String?
836
817
  zipCode String?
837
- country String? @default("US")
818
+ country String? @default("US")
838
819
  phone String?
839
- documentIDId String? @unique
820
+ documentIDId String? @unique
840
821
  documentID DocumentID?
841
822
  comment BashComment[]
842
823
  associatedBashes AssociatedBash[]
843
- invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
844
- invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
845
- notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
846
- remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
847
- remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
848
- eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
824
+ invitationsCreatedByMe Invitation[] @relation("InvitationsCreatedByMe")
825
+ invitationsSentToMe Invitation[] @relation("InvitationsSentToMe")
826
+ notificationsCreatedByMe BashNotification[] @relation("NotificationsCreatedByMe")
827
+ remindersCreatedByMe Reminder[] @relation("RemindersCreatedByMe")
828
+ remindersAssignedToMe Reminder[] @relation("RemindersAssignedToMe")
829
+ eventTasksAssignedToMe EventTask[] @relation("TasksAssignedToMe")
849
830
  checkouts Checkout[]
850
831
  ticketTiersWaitListsIveJoined TicketTier[]
851
832
  contacts Contact[]
@@ -855,13 +836,6 @@ model User {
855
836
  userSubscription UserSubscription?
856
837
  serviceSubcriptions ServiceSubscription[]
857
838
  volunteerService VolunteerService[]
858
- eventService EventService[]
859
- entertainmentService EntertainmentService[]
860
- vendor Vendor[]
861
- exhibitor Exhibitor[]
862
- sponsor Sponsor[]
863
- venue Venue[]
864
- organization Organization[]
865
839
  }
866
840
 
867
841
  model Contact {
@@ -893,390 +867,182 @@ model AssociatedBash {
893
867
  @@unique([ownerEmail, bashEventId])
894
868
  }
895
869
 
870
+ //Common data for all services; 1-1 relation between each individual service model such as Venue
896
871
  model Service {
897
- id String @id @default(cuid())
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[]
872
+ id String @id @default(cuid())
948
873
 
949
- @@index([email])
950
- @@index([phone])
874
+ serviceType ServiceTypes
875
+ serviceStatus ServiceStatus @default(Draft)
876
+
877
+ //current owner
878
+ ownerId String?
879
+ owner User? @relation("OwnedService", fields: [ownerId], references: [id])
880
+
881
+ //original creator
882
+ creatorId String?
883
+ creator User? @relation("CreatedService", fields: [creatorId], references: [id])
884
+
885
+ createdAt DateTime @default(now())
886
+ updatedAt DateTime @updatedAt
887
+
888
+ serviceName String?
889
+
890
+ //this is not the business info but that which is associated with the service
891
+ email String?
892
+ street String?
893
+ city String?
894
+ state String?
895
+ zipCode String?
896
+ country String?
897
+ phone String?
898
+ description String?
899
+
900
+ additionalInfo String?
901
+ coverPhoto String?
902
+
903
+ mission String?
904
+ communityInvolvement String?
905
+ emergencyContact String?
906
+ contactDetails String?
907
+ rates String?
908
+ cancellationPolicy String?
909
+ refundPolicy String?
910
+ insurancePolicy String?
911
+
912
+ stripeAccountId String?
913
+ stripeAccount StripeAccount? @relation(fields: [stripeAccountId], references: [id], onDelete: Cascade)
914
+
915
+ visibility VisibilityPreference @default(Public)
916
+ availableDateTimes Availability[] @relation("AvailableDateTimes")
917
+
918
+ bashesInterestedIn BashEventType[]
919
+ bookings Booking[]
920
+ targetAudiences TargetAudience[]
921
+ media Media[]
922
+ ServiceLink ServiceLink[]
923
+
924
+ eventService EventService?
925
+ entertainmentService EntertainmentService?
926
+ vendor Vendor?
927
+ exhibitor Exhibitor?
928
+ sponsor Sponsor?
929
+ venue Venue?
930
+ organization Organization?
951
931
  }
952
932
 
953
933
  model StripeAccount {
954
- id String @id @default(cuid())
955
- stripeAccountId String?
956
- entityId String
957
- entityType EntityType
958
- createdAt DateTime @default(now())
959
- updatedAt DateTime @updatedAt
960
- service Service? @relation(fields: [entityId], references: [id])
961
- bashEventId String?
962
- bashEvent BashEvent? @relation(fields: [bashEventId], references: [id])
934
+ id String @id @default(cuid())
935
+ stripeAccountId String
936
+ createdAt DateTime @default(now())
937
+ updatedAt DateTime @updatedAt
938
+ service Service[]
963
939
  }
964
940
 
965
941
  model VolunteerService {
966
942
  id String @id @default(cuid())
967
- serviceId String?
968
- service Service? @relation(fields: [serviceId], references: [id])
943
+ // service Service
969
944
  userId String?
970
945
  user User? @relation(fields: [userId], references: [id])
971
946
  serviceRangeId String?
972
947
  serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
973
- media Media[] @relation("VolunteerServiceMedia")
974
948
  links Link[] @relation("VolunteerServiceLinks")
975
949
  availableDateTimes Availability[] @relation("AvailableDateTimes")
976
950
  fullName String?
977
951
  address String?
978
952
  email String?
979
953
  phone String?
980
- agreedToAgreement Boolean? @default(false)
954
+ agreedToAgreement Boolean? @default(false)
981
955
  description String?
982
956
  status VolunteerServiceStatus?
957
+ Media Media[]
983
958
  }
984
959
 
985
960
  model EventService {
986
- id String @id @default(cuid())
987
- ownerId String
988
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
989
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
990
- serviceId String
991
- eventServiceName String
992
- eventServiceTypes EventServiceType[]
993
- eventServiceSubType String?
994
- email String
995
- street String
996
- city String
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
961
+ id String @id @default(cuid())
962
+ serviceId String @unique
963
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
964
+ eventServiceTypes EventServiceType[]
965
+ eventServiceSubType String?
966
+ yearsOfExperience YearsOfExperience
967
+ crowdSizeId String? @unique
968
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
969
+ goodsOrServices String[]
970
+ menuItems String?
971
+ venueTypes String[]
1026
972
  }
1027
973
 
1028
974
  model EntertainmentService {
1029
975
  id String @id @default(cuid())
1030
- ownerId String
1031
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1032
- service Service @relation(fields: [serviceId], references: [id])
1033
- serviceId String
1034
- entertainmentServiceName String
976
+ serviceId String @unique
977
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1035
978
  entertainmentServiceTypes EntertainmentServiceType[]
1036
979
  entertainmentServiceSubType String?
1037
980
  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
981
  yearsOfExperience YearsOfExperience
1050
- description String?
1051
982
  crowdSizeId String? @unique
1052
983
  crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1053
- additionalInfo String?
1054
984
  goodsOrServices String[]
1055
985
  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
986
  }
1070
987
 
1071
988
  model Vendor {
1072
- id String @id @default(cuid())
1073
- ownerId String
1074
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1075
- service Service @relation(fields: [serviceId], references: [id])
1076
- serviceId String
1077
- vendorName String
1078
- email String
1079
- street String
1080
- city String
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
989
+ id String @id @default(cuid())
990
+ serviceId String @unique
991
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
992
+ yearsOfExperience YearsOfExperience
993
+ crowdSizeId String? @unique
994
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
995
+ goodsOrServices String[]
996
+ menuItems String?
997
+ venueTypes String[]
1110
998
  }
1111
999
 
1112
1000
  model Exhibitor {
1113
- id String @id @default(cuid())
1114
- ownerId String
1115
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1116
- service Service @relation(fields: [serviceId], references: [id])
1117
- serviceId String
1118
- exhibitorName String
1119
- email String
1120
- street String
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[]
1001
+ id String @id @default(cuid())
1002
+ serviceId String @unique
1003
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1004
+ yearsOfExperience YearsOfExperience
1005
+ crowdSizeId String? @unique
1006
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1007
+ goodsOrServices String[]
1008
+ venueTypes String[]
1150
1009
  }
1151
1010
 
1152
1011
  model Sponsor {
1153
- id String @id @default(cuid())
1154
- ownerId String
1155
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1156
- service Service @relation(fields: [serviceId], references: [id])
1157
- serviceId String
1158
- sponsorName String
1159
- email String
1160
- street String
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
1012
+ id String @id @default(cuid())
1013
+ serviceId String @unique
1014
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1015
+ yearsOfExperience YearsOfExperience
1016
+ crowdSizeId String? @unique
1017
+ crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1018
+ goodsOrServices String[]
1019
+ menuItems String?
1190
1020
  }
1191
1021
 
1192
1022
  model Venue {
1193
- id String @id @default(cuid())
1194
- ownerId String
1195
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1196
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1197
- serviceId String?
1198
- serviceConnectionId String?
1199
- serviceConnection String?
1200
- venueName String?
1201
- email String?
1202
- place String?
1203
- street String?
1204
- city String?
1205
- state String?
1206
- zipCode String?
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?
1023
+ id String @id @default(cuid())
1024
+ serviceId String @unique
1025
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1026
+ // serviceConnectionId String? //Check: ?
1027
+ // serviceConnection String?
1028
+ yearsInBusiness YearsOfExperience @default(LessThanOneYear)
1029
+ amenities String[]
1030
+ menuItems String?
1031
+ features String[]
1032
+ venueTypes String[]
1033
+ pitch String?
1034
+ capacity Int?
1035
+ trademark Boolean?
1036
+ manager Boolean?
1240
1037
  }
1241
1038
 
1242
1039
  model Organization {
1243
- id String @id @default(cuid())
1244
- ownerId String
1245
- owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
1246
- service Service? @relation(fields: [serviceId], references: [id])
1247
- serviceId String?
1248
- organizationName String
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
1040
+ id String @id @default(cuid())
1041
+ serviceId String @unique
1042
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1043
+ organizationType OrganizationType[]
1044
+ goodsOrServices String[]
1045
+ venueTypes String[]
1280
1046
  }
1281
1047
 
1282
1048
  enum EventServiceType {
@@ -1355,25 +1121,14 @@ model ServiceRange {
1355
1121
  }
1356
1122
 
1357
1123
  model Availability {
1358
- id String @id @default(cuid())
1359
- startDateTime String
1360
- endDateTime String
1361
- venueId String?
1362
- venue Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
1363
- eventServiceId String?
1364
- eventService EventService? @relation("AvailableDateTimes", fields: [eventServiceId], references: [id])
1365
- entertainmentServiceId String?
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])
1124
+ id String @id @default(cuid())
1125
+ startDateTime String
1126
+ endDateTime String
1127
+ venueId String?
1128
+ serviceId String?
1129
+ service Service? @relation("AvailableDateTimes", fields: [serviceId], references: [id])
1130
+ volunteerServiceId String?
1131
+ volunteerService VolunteerService? @relation("AvailableDateTimes", fields: [volunteerServiceId], references: [id])
1377
1132
  }
1378
1133
 
1379
1134
  enum VisibilityPreference {
@@ -1445,25 +1200,11 @@ model VerificationToken {
1445
1200
  }
1446
1201
 
1447
1202
  model ServiceLink {
1448
- id String @id @default(cuid())
1449
- serviceId String
1450
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1451
- linkId String
1452
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
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?
1203
+ id String @id @default(cuid())
1204
+ serviceId String @unique
1205
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1206
+ linkId String
1207
+ link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1467
1208
 
1468
1209
  @@index([serviceId])
1469
1210
  }
@@ -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
- availableDateTimes?: Availability[];
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
- availableDateTimes: Availability[];
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
  }