@optimatech88/titomeet-shared-lib 1.0.1 → 1.0.3

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": "@optimatech88/titomeet-shared-lib",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -34,6 +34,7 @@ model User {
34
34
 
35
35
  accounts Account[]
36
36
  messages Message[]
37
+ events Event[]
37
38
  }
38
39
 
39
40
  model Account {
@@ -44,6 +45,19 @@ model Account {
44
45
  userId String
45
46
  }
46
47
 
48
+ model Address {
49
+ id String @id @default(uuid())
50
+ name String
51
+ city String
52
+ state String
53
+ country String
54
+ postalCode String
55
+
56
+ events Event[]
57
+ createdAt DateTime @default(now())
58
+ updatedAt DateTime @updatedAt
59
+ }
60
+
47
61
  enum EventAccess {
48
62
  FREE
49
63
  PAID
@@ -67,7 +81,7 @@ model Event {
67
81
  endDate DateTime
68
82
  startTime String // Format: "HH:mm"
69
83
  endTime String // Format: "HH:mm"
70
- address String
84
+
71
85
  capacity Int
72
86
  coverPicture String
73
87
  badge String
@@ -78,6 +92,12 @@ model Event {
78
92
  chat Chat? // Optional one-to-one relation
79
93
  status EventStatus @default(DRAFT)
80
94
 
95
+ address Address @relation(fields: [addressId], references: [id])
96
+ addressId String
97
+
98
+ postedBy User @relation(fields: [postedById], references: [id])
99
+ postedById String
100
+
81
101
  createdAt DateTime @default(now())
82
102
  updatedAt DateTime @updatedAt
83
103
  }
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './auth/auth.guard';
2
- export { PrismaClient, User, Account, UserRole, Event, EventAccess, EventVisibility, EventStatus, EventPrice } from '@prisma/client';
2
+ export { PrismaClient, User, Account, UserRole, Event, EventAccess, EventVisibility, EventStatus, EventPrice, Address } from '@prisma/client';
3
3
 
4
4
  //auth
5
5
  export * from './auth/auth.guard';