@bash-app/bash-common 27.3.3 → 27.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "27.3.3",
3
+ "version": "27.5.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",
@@ -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
  }
@@ -895,15 +895,16 @@ model AssociatedBash {
895
895
 
896
896
  model Service {
897
897
  id String @id @default(cuid())
898
- // ownerId String
899
- // owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
898
+ // userId String
899
+ // user User @relation(fields: [userId], references: [id], onDelete: Cascade)
900
900
  // stripeServiceCustomerId String? @unique
901
901
  stripeBusinessId String @unique
902
902
  // stripeBusinessType String @default("Individual")
903
- serviceType ServiceTypes
903
+ serviceType ServiceTypes
904
904
  creatorId String
905
905
  creator User @relation("CreatedService", fields: [creatorId], references: [id], onDelete: Cascade)
906
- dateCreated DateTime @default(now())
906
+ createdAt DateTime @default(now())
907
+ updatedAt DateTime @updatedAt
907
908
  email String
908
909
  place String?
909
910
  street String
@@ -977,7 +978,7 @@ model VolunteerService {
977
978
  address String?
978
979
  email String?
979
980
  phone String?
980
- agreedToAgreement Boolean? @default(false)
981
+ agreedToAgreement Boolean? @default(false)
981
982
  description String?
982
983
  status VolunteerServiceStatus?
983
984
  }
@@ -91,7 +91,7 @@ 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 = ValueOf<typeof ServiceTypes>;
94
+ export type ValueOfServiceType = typeof ServiceTypes[keyof typeof ServiceTypes];
95
95
 
96
96
  export const ServiceTypes = {
97
97
  'EventServices': 'eventServices',
@@ -101,12 +101,14 @@ export const ServiceTypes = {
101
101
  'Sponsors': 'sponsors',
102
102
  'Exhibitors': 'exhibitors',
103
103
  'EntertainmentServices': 'entertainmentServices',
104
- } satisfies {[key: string]: keyof ServiceExt}
104
+ } as const;
105
105
 
106
- // export const ServiceStatus = {
107
- // 'Draft': 'draft',
108
- // 'Created': 'created',
109
- // } satisfies {[key: string]: keyof Service}
106
+ export type ValueOfServiceStatus = typeof ServiceStatus[keyof typeof ServiceStatus];
107
+
108
+ export const ServiceStatus = {
109
+ 'Draft': 'draft',
110
+ 'Created': 'created',
111
+ } as const;
110
112
 
111
113
  export type FilterFields = {
112
114
  price: string[];