@bash-app/bash-common 27.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "27.7.0",
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
+ }
@@ -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,11 @@ 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
+ 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? @default("US")
817
+ country String? @default("US")
838
818
  phone String?
839
- documentIDId String? @unique
819
+ documentIDId String? @unique
840
820
  documentID DocumentID?
841
821
  comment BashComment[]
842
822
  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")
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,16 +834,7 @@ model User {
854
834
  bookingForMe Booking[]
855
835
  userSubscription UserSubscription?
856
836
  serviceSubcriptions ServiceSubscription[]
857
- volunteerService VolunteerService[]
858
- eventService EventService[]
859
- entertainmentService EntertainmentService[]
860
- vendor Vendor[]
861
- exhibitor Exhibitor[]
862
- sponsor Sponsor[]
863
- venue Venue[]
864
- organization Organization[]
865
- venueCreator Venue[] @relation("VenueProfileOwner")
866
- venueOwner Venue[] @relation("VenueProfileCreator")
837
+ VolunteerService VolunteerService[]
867
838
  }
868
839
 
869
840
  model Contact {
@@ -895,85 +866,79 @@ model AssociatedBash {
895
866
  @@unique([ownerEmail, bashEventId])
896
867
  }
897
868
 
869
+ //Common data for all services; 1-1 relation between each individual service model such as Venue
898
870
  model Service {
899
- id String @id @default(cuid())
900
- // ownerId String
901
- // owner PublicUser @relation(fields: [ownerId], references: [id], onDelete: Cascade)
902
- // stripeServiceCustomerId String? @unique
903
- stripeBusinessId String? @unique
904
- // stripeBusinessType String @default("Individual")
905
- serviceType ServiceTypes
906
- creatorId String?
907
- creator User? @relation("CreatedService", fields: [creatorId], references: [id], onDelete: Cascade)
908
- createdAt DateTime @default(now())
909
- updatedAt DateTime @updatedAt
910
- email String?
911
- place String?
912
- street String?
913
- city String?
914
- state String?
915
- zipCode String?
916
- country String?
917
- phone String?
918
- name String? @default("New Service")
919
- coverPhoto String?
920
- agreedToAgreement Boolean?
921
- media Media[]
922
- customServiceTag String[]
923
- yearsOfExperince YearsOfExperience? @default(LessThanOneYear)
924
- serviceLinks ServiceLink[]
925
- description String?
926
- canContact Boolean?
927
- // musicGenre MusicGenreType?
928
- visibility VisibilityPreference? @default(Public)
929
- // bashesInterestedIn BashEventType[]
930
- status ServiceStatus? @default(Draft)
931
- venues Venue[]
932
- targetAudienceId String? @unique
933
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
934
- // volunteerService VolunteerService?
935
- volunteerServices VolunteerService[]
936
- eventServices EventService[]
937
- entertainmentServices EntertainmentService[]
938
- vendors Vendor[]
939
- exhibitor Exhibitor[]
940
- sponsors Sponsor[]
941
- organizations Organization[]
942
- trademark Boolean?
943
- manager Boolean?
944
- dba String?
945
- contactPerson String?
946
- contactPhone String?
947
- contactEmail String?
948
- businessPhone String?
949
- bookings Booking[]
950
- stripeAccount StripeAccount[]
871
+ id String @id @default(cuid())
951
872
 
952
- @@index([email])
953
- @@index([phone])
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?
954
925
  }
955
926
 
956
927
  model StripeAccount {
957
- id String @id @default(cuid())
958
- stripeAccountId String?
959
- entityId String
960
- entityType EntityType
961
- createdAt DateTime @default(now())
962
- updatedAt DateTime @updatedAt
963
- service Service? @relation(fields: [entityId], references: [id])
964
- bashEventId String?
965
- 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[]
966
933
  }
967
934
 
968
935
  model VolunteerService {
969
936
  id String @id @default(cuid())
970
- serviceId String?
971
- service Service? @relation(fields: [serviceId], references: [id])
937
+ // service Service
972
938
  userId String?
973
939
  user User? @relation(fields: [userId], references: [id])
974
940
  serviceRangeId String?
975
941
  serviceRange ServiceRange? @relation(fields: [serviceRangeId], references: [id])
976
- media Media[] @relation("VolunteerServiceMedia")
977
942
  links Link[] @relation("VolunteerServiceLinks")
978
943
  availableDateTimes Availability[] @relation("AvailableDateTimes")
979
944
  fullName String?
@@ -983,318 +948,95 @@ model VolunteerService {
983
948
  agreedToAgreement Boolean? @default(false)
984
949
  description String?
985
950
  status VolunteerServiceStatus?
951
+ Media Media[]
986
952
  }
987
953
 
988
954
  model EventService {
989
- id String @id @default(cuid())
990
- creatorId String?
991
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
992
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
993
- serviceId String?
994
- serviceConnectionId String?
995
- serviceConnection String?
996
- name String?
997
- eventServiceTypes EventServiceType[]
998
- eventServiceSubType String?
999
- email String?
1000
- street String?
1001
- city String?
1002
- state String?
1003
- zipCode String?
1004
- country String?
1005
- phone String?
1006
- coverPhoto String?
1007
- media Media[]
1008
- visibility VisibilityPreference? @default(Public)
1009
- status ServiceStatus ? @default(Draft)
1010
- yearsOfExperience YearsOfExperience?
1011
- description String?
1012
- crowdSizeId String? @unique
1013
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1014
- additionalInfo String?
1015
- goodsOrServices String[]
1016
- menuItems String?
1017
- venueTypes String[]
1018
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1019
- mission String?
1020
- communityInvolvement String?
1021
- emergencyContact String?
1022
- contactDetails String?
1023
- rates String?
1024
- cancellationPolicy String?
1025
- refundPolicy String?
1026
- insurancePolicy String?
1027
- bashesInterestedIn BashEventType[]
1028
- links ServiceLink[]
1029
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1030
- 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[]
1031
966
  }
1032
967
 
1033
968
  model EntertainmentService {
1034
969
  id String @id @default(cuid())
1035
- creatorId String?
1036
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1037
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1038
- serviceId String?
1039
- serviceConnectionId String?
1040
- serviceConnection String?
1041
- name String?
970
+ serviceId String @unique
971
+ service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1042
972
  entertainmentServiceTypes EntertainmentServiceType[]
1043
973
  entertainmentServiceSubType String?
1044
974
  genre MusicGenreType?
1045
- email String?
1046
- street String?
1047
- city String?
1048
- state String?
1049
- zipCode String?
1050
- country String?
1051
- phone String?
1052
- coverPhoto String?
1053
- media Media[]
1054
- visibility VisibilityPreference? @default(Public)
1055
- status ServiceStatus? @default(Draft)
1056
- yearsOfExperience YearsOfExperience?
1057
- description String?
975
+ yearsOfExperience YearsOfExperience
1058
976
  crowdSizeId String? @unique
1059
977
  crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1060
- additionalInfo String?
1061
978
  goodsOrServices String[]
1062
979
  venueTypes String[]
1063
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1064
- mission String?
1065
- communityInvolvement String?
1066
- emergencyContact String?
1067
- contactDetails String?
1068
- rates String?
1069
- cancellationPolicy String?
1070
- refundPolicy String?
1071
- insurancePolicy String?
1072
- bashesInterestedIn BashEventType[]
1073
- links ServiceLink[]
1074
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1075
- targetAudienceId String? @unique
1076
980
  }
1077
981
 
1078
982
  model Vendor {
1079
- id String @id @default(cuid())
1080
- creatorId String?
1081
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1082
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1083
- serviceId String?
1084
- serviceConnectionId String?
1085
- serviceConnection String?
1086
- name String?
1087
- email String?
1088
- street String?
1089
- city String?
1090
- state String?
1091
- zipCode String?
1092
- country String?
1093
- phone String?
1094
- coverPhoto String?
1095
- media Media[]
1096
- visibility VisibilityPreference? @default(Public)
1097
- status ServiceStatus ? @default(Draft)
1098
- yearsOfExperience YearsOfExperience?
1099
- description String?
1100
- crowdSizeId String? @unique
1101
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1102
- additionalInfo String?
1103
- goodsOrServices String[]
1104
- menuItems String?
1105
- venueTypes String[]
1106
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1107
- mission String?
1108
- communityInvolvement String?
1109
- emergencyContact String?
1110
- contactDetails String?
1111
- rates String?
1112
- cancellationPolicy String?
1113
- refundPolicy String?
1114
- insurancePolicy String?
1115
- bashesInterestedIn BashEventType[]
1116
- links ServiceLink[]
1117
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1118
- 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[]
1119
992
  }
1120
993
 
1121
994
  model Exhibitor {
1122
- id String @id @default(cuid())
1123
- creatorId String?
1124
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1125
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1126
- serviceId String?
1127
- serviceConnectionId String?
1128
- serviceConnection String?
1129
- name String?
1130
- email String?
1131
- street String?
1132
- city String?
1133
- state String?
1134
- zipCode String?
1135
- country String?
1136
- phone String?
1137
- coverPhoto String?
1138
- media Media[]
1139
- visibility VisibilityPreference? @default(Public)
1140
- yearsOfExperience YearsOfExperience?
1141
- description String?
1142
- crowdSizeId String? @unique
1143
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id], onDelete: Cascade)
1144
- targetAudienceId String? @unique
1145
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1146
- additionalInfo String?
1147
- goodsOrServices String[]
1148
- venueTypes String[]
1149
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1150
- status ServiceStatus ? @default(Draft)
1151
- mission String?
1152
- communityInvolvement String?
1153
- emergencyContact String?
1154
- contactDetails String?
1155
- rates String?
1156
- cancellationPolicy String?
1157
- refundPolicy String?
1158
- insurancePolicy String?
1159
- bashesInterestedIn BashEventType[]
1160
- 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[]
1161
1003
  }
1162
1004
 
1163
1005
  model Sponsor {
1164
- id String @id @default(cuid())
1165
- creatorId String?
1166
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1167
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1168
- serviceId String?
1169
- serviceConnectionId String?
1170
- serviceConnection String?
1171
- name String?
1172
- email String?
1173
- street String?
1174
- city String?
1175
- state String?
1176
- zipCode String?
1177
- country String?
1178
- phone String?
1179
- coverPhoto String?
1180
- media Media[]
1181
- visibility VisibilityPreference? @default(Public)
1182
- status ServiceStatus ? @default(Draft)
1183
- yearsOfExperience YearsOfExperience?
1184
- description String?
1185
- crowdSizeId String? @unique
1186
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1187
- additionalInfo String?
1188
- goodsOrServices String[]
1189
- menuItems String?
1190
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1191
- mission String?
1192
- communityInvolvement String?
1193
- emergencyContact String?
1194
- contactDetails String?
1195
- rates String?
1196
- cancellationPolicy String?
1197
- refundPolicy String?
1198
- insurancePolicy String?
1199
- bashesInterestedIn BashEventType[]
1200
- links ServiceLink[]
1201
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1202
- 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?
1203
1014
  }
1204
1015
 
1205
1016
  model Venue {
1206
- id String @id @default(cuid())
1207
- creatorId String?
1208
- creator User? @relation("VenueProfileCreator", fields: [creatorId], references: [id], onDelete: Cascade)
1209
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1210
- serviceId String?
1211
- serviceConnectionId String?
1212
- serviceConnection String?
1213
- ownerId String?
1214
- owner User? @relation("VenueProfileOwner", fields: [ownerId], references: [id], onDelete: Cascade)
1215
- name String?
1216
- email String?
1217
- place String?
1218
- street String?
1219
- city String?
1220
- state String?
1221
- zipCode String?
1222
- country String?
1223
- phone String?
1224
- coverPhoto String?
1225
- media Media[]
1226
- visibility VisibilityPreference @default(Public)
1227
- status ServiceStatus @default(Draft)
1228
- yearsInBusiness YearsOfExperience @default(LessThanOneYear)
1229
- description String?
1230
- amenities String[]
1231
- menuItems String?
1232
- additionalInfo String?
1233
- features String[]
1234
- venueTypes String[]
1235
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1236
- mission String?
1237
- pitch String?
1238
- communityInvolvement String?
1239
- emergencyContact String?
1240
- contactDetails String?
1241
- rates String?
1242
- cancellationPolicy String?
1243
- refundPolicy String?
1244
- safetyPolicy String?
1245
- insurancePolicy String?
1246
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1247
- targetAudienceId String? @unique
1248
- bashesInterestedIn BashEventType[]
1249
- links ServiceLink[]
1250
- capacity Int?
1251
- amountOfGuests AmountOfGuests? @relation(fields: [amountOfGuestsId], references: [id], onDelete: Cascade)
1252
- amountOfGuestsId String? @unique
1253
- trademark Boolean?
1254
- manager Boolean?
1255
- user User[]
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?
1256
1031
  }
1257
1032
 
1258
1033
  model Organization {
1259
- id String @id @default(cuid())
1260
- creatorId String?
1261
- creator User? @relation(fields: [creatorId], references: [id], onDelete: Cascade)
1262
- service Service? @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1263
- serviceId String?
1264
- serviceConnectionId String?
1265
- serviceConnection String?
1266
- name String?
1267
- organizationType OrganizationType[]
1268
- email String?
1269
- street String?
1270
- city String?
1271
- state String?
1272
- zipCode String?
1273
- country String?
1274
- phone String?
1275
- coverPhoto String?
1276
- media Media[]
1277
- visibility VisibilityPreference? @default(Public)
1278
- status ServiceStatus? @default(Draft)
1279
- description String?
1280
- crowdSizeId String? @unique
1281
- crowdSize AmountOfGuests? @relation(fields: [crowdSizeId], references: [id])
1282
- additionalInfo String?
1283
- goodsOrServices String[]
1284
- venueTypes String[]
1285
- availableDateTimes Availability[] @relation("AvailableDateTimes")
1286
- mission String?
1287
- communityInvolvement String?
1288
- emergencyContact String?
1289
- contactDetails String?
1290
- rates String?
1291
- cancellationPolicy String?
1292
- refundPolicy String?
1293
- insurancePolicy String?
1294
- bashesInterestedIn BashEventType[]
1295
- links ServiceLink[]
1296
- targetAudience TargetAudience? @relation(fields: [targetAudienceId], references: [id])
1297
- 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[]
1298
1040
  }
1299
1041
 
1300
1042
  enum EventServiceType {
@@ -1373,25 +1115,14 @@ model ServiceRange {
1373
1115
  }
1374
1116
 
1375
1117
  model Availability {
1376
- id String @id @default(cuid())
1377
- startDateTime String
1378
- endDateTime String
1379
- venueId String?
1380
- venue Venue? @relation("AvailableDateTimes", fields: [venueId], references: [id])
1381
- eventServiceId String?
1382
- eventService EventService? @relation("AvailableDateTimes", fields: [eventServiceId], references: [id])
1383
- entertainmentServiceId String?
1384
- entertainmentService EntertainmentService? @relation("AvailableDateTimes", fields: [entertainmentServiceId], references: [id])
1385
- vendorId String?
1386
- vendor Vendor? @relation("AvailableDateTimes", fields: [vendorId], references: [id])
1387
- exhibitorId String?
1388
- exhibitor Exhibitor? @relation("AvailableDateTimes", fields: [exhibitorId], references: [id])
1389
- sponsorId String?
1390
- sponsor Sponsor? @relation("AvailableDateTimes", fields: [sponsorId], references: [id])
1391
- organizationId String?
1392
- organization Organization? @relation("AvailableDateTimes", fields: [organizationId], references: [id])
1393
- volunteerServiceId String?
1394
- 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])
1395
1126
  }
1396
1127
 
1397
1128
  enum VisibilityPreference {
@@ -1463,25 +1194,11 @@ model VerificationToken {
1463
1194
  }
1464
1195
 
1465
1196
  model ServiceLink {
1466
- id String @id @default(cuid())
1467
- serviceId String
1468
- service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
1469
- linkId String
1470
- link Link @relation(fields: [linkId], references: [id], onDelete: Cascade)
1471
- eventService EventService? @relation(fields: [eventServiceId], references: [id])
1472
- eventServiceId String?
1473
- entertainmentService EntertainmentService? @relation(fields: [entertainmentServiceId], references: [id])
1474
- entertainmentServiceId String?
1475
- vendor Vendor? @relation(fields: [vendorId], references: [id])
1476
- vendorId String?
1477
- exhibitor Exhibitor? @relation(fields: [exhibitorId], references: [id])
1478
- exhibitorId String?
1479
- sponsor Sponsor? @relation(fields: [sponsorId], references: [id])
1480
- sponsorId String?
1481
- venue Venue? @relation(fields: [venueId], references: [id])
1482
- venueId String?
1483
- organization Organization? @relation(fields: [organizationId], references: [id])
1484
- 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)
1485
1202
 
1486
1203
  @@index([serviceId])
1487
1204
  }
@@ -91,25 +91,6 @@ export type ContactOrUser = Contact | PublicUser;
91
91
  export type UnionFromArray<T extends ReadonlyArray<any>> = T[number];
92
92
  export type ValueOf<T> = T[keyof T];
93
93
 
94
- export type ValueOfServiceType = typeof ServiceTypes[keyof typeof ServiceTypes];
95
-
96
- export const ServiceTypes = {
97
- 'EventServices': 'eventServices',
98
- 'Organizations': 'organizations',
99
- 'Venues': 'venues',
100
- 'Vendors': 'vendors',
101
- 'Sponsors': 'sponsors',
102
- 'Exhibitors': 'exhibitors',
103
- 'EntertainmentServices': 'entertainmentServices',
104
- } as const;
105
-
106
- export type ValueOfServiceStatus = typeof ServiceStatus[keyof typeof ServiceStatus];
107
-
108
- export const ServiceStatus = {
109
- 'Draft': 'draft',
110
- 'Created': 'created',
111
- } as const;
112
-
113
94
  export type FilterFields = {
114
95
  price: string[];
115
96
  ageRequirement: string[];
@@ -322,19 +303,6 @@ export const YearsOfExperienceToString: { [key in YearsOfExperience]: string } =
322
303
  [YearsOfExperience.FivePlusYears]: 'More than five years',
323
304
  };
324
305
 
325
- export type ServiceTypeToStringType = {
326
- [key in ValueOf<typeof ServiceTypes>]: string;
327
- };
328
- export const ServiceTypeToString: ServiceTypeToStringType = {
329
- [ServiceTypes.EventServices]: "/servicesDefault.webp",
330
- [ServiceTypes.EntertainmentServices]: "/servicesDefault.webp",
331
- [ServiceTypes.Vendors]: "/servicesDefault.webp",
332
- [ServiceTypes.Exhibitors]: "/servicesDefault.webp",
333
- [ServiceTypes.Sponsors]: "/servicesDefault.webp",
334
- [ServiceTypes.Venues]: "/servicesDefault.webp",
335
- [ServiceTypes.Organizations]: "/servicesDefault.webp"
336
- }
337
-
338
306
  export type BashEventTypeToStringType = {
339
307
  [key in BashEventType]: string;
340
308
  };
@@ -13,8 +13,6 @@ import {
13
13
  ServiceLink,
14
14
  Link, Venue, Availability,
15
15
  TargetAudience,
16
- ServiceStatus,
17
- VolunteerServiceStatus,
18
16
  Vendor,
19
17
  EventService,
20
18
  EntertainmentService,
@@ -23,9 +21,11 @@ import {
23
21
  Organization,
24
22
  Booking,
25
23
  VolunteerService, Prisma, ServiceRange,
26
- ServiceTypes,
24
+ StripeAccount,
25
+ VisibilityPreference,
26
+ BashEventType,
27
27
  } from "@prisma/client";
28
- import {UnionFromArray} from "./definitions";
28
+ import { UnionFromArray } from "./definitions";
29
29
 
30
30
  export const FRONT_END_USER_DATA_TO_SELECT = {
31
31
  id: true,
@@ -149,78 +149,64 @@ export const EVENT_TASK_DATA_TO_INCLUDE = {
149
149
  }
150
150
  } satisfies Prisma.EventTaskInclude;
151
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
+ }
152
174
 
153
175
  export interface EventServiceExt extends EventService {
154
176
  service: Service;
155
- availableDateTimes: Availability[];
156
- targetAudience: TargetAudience;
157
- links: ServiceLinkExt[];
158
177
  crowdSize?: AmountOfGuests;
159
- media?: Media[];
160
178
  }
161
179
 
162
180
  export interface EntertainmentServiceExt extends EntertainmentService {
163
181
  service: Service;
164
- availableDateTimes: Availability[];
165
- targetAudience: TargetAudience;
166
- links: ServiceLinkExt[];
167
182
  crowdSize?: AmountOfGuests;
168
- media?: Media[];
169
- status: ServiceStatus;
170
183
  }
171
184
 
172
185
  export interface ExhibitorExt extends Exhibitor {
173
186
  service: Service;
174
- availableDateTimes: Availability[];
175
- targetAudience: TargetAudience;
176
- links: ServiceLinkExt[];
177
187
  crowdSize?: AmountOfGuests;
178
- media?: Media[];
179
- status: ServiceStatus;
180
188
  }
181
189
 
182
190
  export interface SponsorExt extends Sponsor {
183
191
  service: Service;
184
- availableDateTimes: Availability[];
185
- targetAudience: TargetAudience;
186
- links: ServiceLinkExt[];
187
192
  crowdSize?: AmountOfGuests;
188
- media?: Media[];
189
- status: ServiceStatus;
190
193
  }
191
194
 
192
195
  export interface VendorExt extends Vendor {
193
196
  service: Service;
194
- availableDateTimes: Availability[];
195
- targetAudience?: TargetAudience;
196
- links: ServiceLinkExt[];
197
197
  crowdSize?: AmountOfGuests;
198
- media?: Media[];
199
- status: ServiceStatus;
200
198
  }
201
199
 
202
200
  export interface VenueExt extends Venue {
203
- creator: User;
204
- owner?: PublicUser;
205
201
  service?: Service;
206
- availableDateTimes?: Availability[];
207
- targetAudience?: TargetAudience | null;
208
- links?: ServiceLinkExt[];
209
- coverPhotoUrl?: string;
210
- media?: Media[];
211
- amountOfGuests?: AmountOfGuests | null;
212
- status: ServiceStatus;
202
+ crowdSize?: AmountOfGuests;
213
203
  }
214
204
 
215
205
  export interface OrganizationExt extends Organization {
216
206
  service?: Service;
217
- availableDateTimes: Availability[];
218
- targetAudience: TargetAudience;
219
- links: ServiceLinkExt[];
220
- crowdSize?: AmountOfGuests;
221
- media?: Media[];
222
- status: ServiceStatus;
207
+ amountOfGuests?: AmountOfGuests;
223
208
  }
209
+ //-----------------------------------------
224
210
 
225
211
  export interface VolunteerServiceExt extends VolunteerService {
226
212
  service?: ServiceExt;
@@ -228,33 +214,8 @@ export interface VolunteerServiceExt extends VolunteerService {
228
214
  media?: Media[];
229
215
  links?: Link[];
230
216
  availableDateTimes?: Availability[];
231
- fullName: string | null;
232
- address: string | null;
233
- email: string | null;
234
- phone: string | null;
235
- description: string | null;
236
- status: VolunteerServiceStatus | null;
237
217
  }
238
218
 
239
- export interface ServiceExt extends Service {
240
- creator: User;
241
- owner?: PublicUser;
242
- media?: Media[];
243
- coverPhotoUrl?: string;
244
- targetAudience?: TargetAudience | null;
245
- volunteerService?: VolunteerService | null;
246
- serviceLinks?: ServiceLinkExt[];
247
- venues?: Venue[];
248
- eventServices?: EventService[];
249
- entertainmentServices?: EntertainmentService[];
250
- vendors?: Vendor[];
251
- exhibitors?: Exhibitor[];
252
- sponsors?: Sponsor[];
253
- organizations?: Organization[];
254
- bookings?: Booking[];
255
- }
256
-
257
-
258
219
  export interface ServiceLinkExt extends ServiceLink {
259
220
  link: Link;
260
221
  }