@optimatech88/titomeet-shared-lib 1.0.52 → 1.0.54
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/.env +1 -1
- package/.github/workflows/npm-publish.yml +34 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/prisma/schema.prisma +468 -466
- package/.env.example +0 -1
package/.env
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
DATABASE_URL="postgresql://postgres:
|
|
1
|
+
DATABASE_URL="postgresql://postgres:postgre@localhost:5432/titomeet?schema=public"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main # Or your main branch
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: 20
|
|
19
|
+
- run: npm ci
|
|
20
|
+
- run: npm run build
|
|
21
|
+
|
|
22
|
+
publish-npm:
|
|
23
|
+
needs: build
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
- uses: actions/setup-node@v4
|
|
28
|
+
with:
|
|
29
|
+
node-version: 20
|
|
30
|
+
registry-url: https://registry.npmjs.org/
|
|
31
|
+
- run: npm ci
|
|
32
|
+
- run: npm publish --access public
|
|
33
|
+
env:
|
|
34
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,eAAO,MAAM,iBAAiB,GAAI,OAAO,eAAe;;;;CAOvD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,WAA8B,CAAC"}
|
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -1,466 +1,468 @@
|
|
|
1
|
-
generator client {
|
|
2
|
-
provider = "prisma-client-js"
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
datasource db {
|
|
6
|
-
provider = "postgresql"
|
|
7
|
-
url = env("DATABASE_URL")
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
model User {
|
|
11
|
-
id String @id @default(cuid())
|
|
12
|
-
username String @unique
|
|
13
|
-
email String @unique
|
|
14
|
-
firstName String
|
|
15
|
-
lastName String
|
|
16
|
-
password String?
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
1
|
+
generator client {
|
|
2
|
+
provider = "prisma-client-js"
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
datasource db {
|
|
6
|
+
provider = "postgresql"
|
|
7
|
+
url = env("DATABASE_URL")
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
model User {
|
|
11
|
+
id String @id @default(cuid())
|
|
12
|
+
username String @unique
|
|
13
|
+
email String @unique
|
|
14
|
+
firstName String
|
|
15
|
+
lastName String
|
|
16
|
+
password String?
|
|
17
|
+
phone String?
|
|
18
|
+
role UserRole @default(USER)
|
|
19
|
+
profilePicture String?
|
|
20
|
+
createdAt DateTime @default(now())
|
|
21
|
+
updatedAt DateTime @updatedAt
|
|
22
|
+
emailVerified Boolean @default(false)
|
|
23
|
+
status UserStatus @default(ACTIVE)
|
|
24
|
+
accounts Account[]
|
|
25
|
+
chatUsers ChatUser[]
|
|
26
|
+
events Event[]
|
|
27
|
+
favorites Favorite[]
|
|
28
|
+
messages Message[]
|
|
29
|
+
notificationsReceived Notification[] @relation("NotificationRecipient")
|
|
30
|
+
notificationsSent Notification[] @relation("NotificationSender")
|
|
31
|
+
orders Order[]
|
|
32
|
+
providers Provider[]
|
|
33
|
+
reviews Review[]
|
|
34
|
+
|
|
35
|
+
userInterests UserInterests?
|
|
36
|
+
transactions Transaction[]
|
|
37
|
+
feedbacks Feedback[]
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
enum AccountType {
|
|
41
|
+
GOOGLE
|
|
42
|
+
EMAIL_PASSWORD
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
model Account {
|
|
46
|
+
id String @id @default(cuid())
|
|
47
|
+
refreshToken String @unique
|
|
48
|
+
expiresAt DateTime
|
|
49
|
+
userId String
|
|
50
|
+
user User @relation(fields: [userId], references: [id])
|
|
51
|
+
type AccountType @default(EMAIL_PASSWORD)
|
|
52
|
+
reference String?
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
model Address {
|
|
56
|
+
id String @id @default(uuid())
|
|
57
|
+
name String
|
|
58
|
+
line2 String?
|
|
59
|
+
city String?
|
|
60
|
+
state String?
|
|
61
|
+
country String
|
|
62
|
+
postalCode String?
|
|
63
|
+
createdAt DateTime @default(now())
|
|
64
|
+
updatedAt DateTime @updatedAt
|
|
65
|
+
countryCode String?
|
|
66
|
+
latitude Float?
|
|
67
|
+
longitude Float?
|
|
68
|
+
type String @default("suburb")
|
|
69
|
+
events Event[]
|
|
70
|
+
Provider Provider[]
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
model EventCategory {
|
|
74
|
+
id String @id @default(cuid())
|
|
75
|
+
name String @unique
|
|
76
|
+
description String?
|
|
77
|
+
createdAt DateTime @default(now())
|
|
78
|
+
updatedAt DateTime @updatedAt
|
|
79
|
+
active Boolean @default(true)
|
|
80
|
+
events Event[] @relation("EventToEventCategory")
|
|
81
|
+
userInterests UserInterests[]
|
|
82
|
+
|
|
83
|
+
parentId String?
|
|
84
|
+
parent EventCategory? @relation("EventCategoryParent", fields: [parentId], references: [id])
|
|
85
|
+
|
|
86
|
+
children EventCategory[] @relation("EventCategoryParent")
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
enum TicketHandler {
|
|
90
|
+
TITOMEET
|
|
91
|
+
OTHER
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
model Event {
|
|
95
|
+
id String @id @default(cuid())
|
|
96
|
+
name String
|
|
97
|
+
description String
|
|
98
|
+
startDate DateTime
|
|
99
|
+
endDate DateTime
|
|
100
|
+
startTime String
|
|
101
|
+
endTime String
|
|
102
|
+
capacity Int
|
|
103
|
+
coverPicture String
|
|
104
|
+
badge String
|
|
105
|
+
tags String[]
|
|
106
|
+
accessType EventAccess @default(FREE)
|
|
107
|
+
visibility EventVisibility @default(PUBLIC)
|
|
108
|
+
status EventStatus @default(DRAFT)
|
|
109
|
+
addressId String?
|
|
110
|
+
postedById String
|
|
111
|
+
createdAt DateTime @default(now())
|
|
112
|
+
updatedAt DateTime @updatedAt
|
|
113
|
+
chat Chat?
|
|
114
|
+
address Address? @relation(fields: [addressId], references: [id])
|
|
115
|
+
postedBy User @relation(fields: [postedById], references: [id])
|
|
116
|
+
prices EventPrice[]
|
|
117
|
+
favorites Favorite[]
|
|
118
|
+
orders Order[]
|
|
119
|
+
categories EventCategory[] @relation("EventToEventCategory")
|
|
120
|
+
providers ProviderOnEvent[]
|
|
121
|
+
remainingSeats Int @default(0)
|
|
122
|
+
type EventType @default(IN_PERSON)
|
|
123
|
+
onlineLink String?
|
|
124
|
+
onlinePassword String?
|
|
125
|
+
ticketHandler TicketHandler @default(TITOMEET)
|
|
126
|
+
ticketUrl String?
|
|
127
|
+
lng Float?
|
|
128
|
+
lat Float?
|
|
129
|
+
location String?
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
enum EventType {
|
|
133
|
+
IN_PERSON
|
|
134
|
+
ONLINE
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
model EventPrice {
|
|
138
|
+
id String @id @default(uuid())
|
|
139
|
+
name String
|
|
140
|
+
amount Float
|
|
141
|
+
description String?
|
|
142
|
+
eventId String
|
|
143
|
+
totalSeats Int @default(1)
|
|
144
|
+
createdAt DateTime @default(now())
|
|
145
|
+
updatedAt DateTime @updatedAt
|
|
146
|
+
event Event @relation(fields: [eventId], references: [id])
|
|
147
|
+
orderItems OrderItem[]
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
model Chat {
|
|
151
|
+
id String @id @default(cuid())
|
|
152
|
+
name String
|
|
153
|
+
eventId String @unique
|
|
154
|
+
createdAt DateTime @default(now())
|
|
155
|
+
updatedAt DateTime @updatedAt
|
|
156
|
+
event Event @relation(fields: [eventId], references: [id])
|
|
157
|
+
users ChatUser[]
|
|
158
|
+
messages Message[]
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
model ChatUser {
|
|
162
|
+
id String @id @default(cuid())
|
|
163
|
+
chatId String
|
|
164
|
+
userId String
|
|
165
|
+
createdAt DateTime @default(now())
|
|
166
|
+
updatedAt DateTime @updatedAt
|
|
167
|
+
chat Chat @relation(fields: [chatId], references: [id])
|
|
168
|
+
user User @relation(fields: [userId], references: [id])
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
model Message {
|
|
172
|
+
id String @id @default(cuid())
|
|
173
|
+
chatId String
|
|
174
|
+
senderId String
|
|
175
|
+
createdAt DateTime @default(now())
|
|
176
|
+
updatedAt DateTime @updatedAt
|
|
177
|
+
files Json?
|
|
178
|
+
text String
|
|
179
|
+
chat Chat @relation(fields: [chatId], references: [id])
|
|
180
|
+
sender User @relation(fields: [senderId], references: [id])
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
model Notification {
|
|
184
|
+
id String @id @default(cuid())
|
|
185
|
+
notifiedToId String
|
|
186
|
+
userId String?
|
|
187
|
+
type NotificationType
|
|
188
|
+
read Boolean @default(false)
|
|
189
|
+
data Json?
|
|
190
|
+
createdAt DateTime @default(now())
|
|
191
|
+
updatedAt DateTime @updatedAt
|
|
192
|
+
notifiedTo User @relation("NotificationRecipient", fields: [notifiedToId], references: [id])
|
|
193
|
+
user User? @relation("NotificationSender", fields: [userId], references: [id])
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
model ProviderCategory {
|
|
197
|
+
id String @id @default(cuid())
|
|
198
|
+
name String @unique
|
|
199
|
+
description String?
|
|
200
|
+
active Boolean @default(true)
|
|
201
|
+
createdAt DateTime @default(now())
|
|
202
|
+
updatedAt DateTime @updatedAt
|
|
203
|
+
providers Provider[]
|
|
204
|
+
|
|
205
|
+
parentId String?
|
|
206
|
+
parent ProviderCategory? @relation("ProviderCategoryParent", fields: [parentId], references: [id])
|
|
207
|
+
|
|
208
|
+
children ProviderCategory[] @relation("ProviderCategoryParent")
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
model Provider {
|
|
212
|
+
id String @id @default(cuid())
|
|
213
|
+
name String
|
|
214
|
+
description String?
|
|
215
|
+
image String?
|
|
216
|
+
userId String
|
|
217
|
+
status ProviderStatus @default(PENDING)
|
|
218
|
+
createdAt DateTime @default(now())
|
|
219
|
+
updatedAt DateTime @updatedAt
|
|
220
|
+
addressId String?
|
|
221
|
+
categoryId String
|
|
222
|
+
docs Json?
|
|
223
|
+
email String?
|
|
224
|
+
phoneNumber String?
|
|
225
|
+
pricingDetails String?
|
|
226
|
+
rating Float?
|
|
227
|
+
website String?
|
|
228
|
+
location String?
|
|
229
|
+
address Address? @relation(fields: [addressId], references: [id])
|
|
230
|
+
category ProviderCategory @relation(fields: [categoryId], references: [id])
|
|
231
|
+
user User @relation(fields: [userId], references: [id])
|
|
232
|
+
reviews Review[]
|
|
233
|
+
events ProviderOnEvent[]
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
enum ProviderOnEventStatus {
|
|
237
|
+
PENDING
|
|
238
|
+
APPROVED
|
|
239
|
+
REJECTED
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
model ProviderOnEvent {
|
|
243
|
+
id String @id @default(cuid())
|
|
244
|
+
providerId String
|
|
245
|
+
provider Provider @relation(fields: [providerId], references: [id])
|
|
246
|
+
eventId String
|
|
247
|
+
event Event @relation(fields: [eventId], references: [id])
|
|
248
|
+
|
|
249
|
+
status ProviderOnEventStatus @default(PENDING)
|
|
250
|
+
|
|
251
|
+
createdAt DateTime @default(now())
|
|
252
|
+
updatedAt DateTime @updatedAt
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
model Review {
|
|
256
|
+
id String @id @default(cuid())
|
|
257
|
+
rating Float
|
|
258
|
+
comment String?
|
|
259
|
+
providerId String
|
|
260
|
+
userId String
|
|
261
|
+
createdAt DateTime @default(now())
|
|
262
|
+
updatedAt DateTime @updatedAt
|
|
263
|
+
provider Provider @relation(fields: [providerId], references: [id])
|
|
264
|
+
user User @relation(fields: [userId], references: [id])
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
model Favorite {
|
|
268
|
+
id String @id @default(cuid())
|
|
269
|
+
userId String
|
|
270
|
+
eventId String
|
|
271
|
+
createdAt DateTime @default(now())
|
|
272
|
+
updatedAt DateTime @updatedAt
|
|
273
|
+
event Event @relation(fields: [eventId], references: [id])
|
|
274
|
+
user User @relation(fields: [userId], references: [id])
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
model Order {
|
|
278
|
+
id String @id @default(cuid())
|
|
279
|
+
userId String
|
|
280
|
+
eventId String
|
|
281
|
+
email String
|
|
282
|
+
status OrderStatus @default(PENDING)
|
|
283
|
+
totalAmount Float
|
|
284
|
+
paymentIntentId String? @unique
|
|
285
|
+
paymentStatus PaymentStatus @default(PENDING)
|
|
286
|
+
createdAt DateTime @default(now())
|
|
287
|
+
updatedAt DateTime @updatedAt
|
|
288
|
+
event Event @relation(fields: [eventId], references: [id])
|
|
289
|
+
user User @relation(fields: [userId], references: [id])
|
|
290
|
+
items OrderItem[]
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
model OrderItem {
|
|
294
|
+
id String @id @default(cuid())
|
|
295
|
+
orderId String
|
|
296
|
+
eventPriceId String
|
|
297
|
+
quantity Int
|
|
298
|
+
unitPrice Float
|
|
299
|
+
createdAt DateTime @default(now())
|
|
300
|
+
updatedAt DateTime @updatedAt
|
|
301
|
+
eventPrice EventPrice @relation(fields: [eventPriceId], references: [id])
|
|
302
|
+
order Order @relation(fields: [orderId], references: [id])
|
|
303
|
+
tickets String[]
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
model UserInterests {
|
|
307
|
+
id String @id @default(cuid())
|
|
308
|
+
|
|
309
|
+
interests EventCategory[]
|
|
310
|
+
|
|
311
|
+
userId String @unique
|
|
312
|
+
user User @relation(fields: [userId], references: [id])
|
|
313
|
+
|
|
314
|
+
createdAt DateTime @default(now())
|
|
315
|
+
updatedAt DateTime @updatedAt
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
enum UserRole {
|
|
319
|
+
SUPER_ADMIN
|
|
320
|
+
ADMIN
|
|
321
|
+
USER
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
enum UserStatus {
|
|
325
|
+
ACTIVE
|
|
326
|
+
INACTIVE
|
|
327
|
+
DELETED
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
enum EventAccess {
|
|
331
|
+
FREE
|
|
332
|
+
PAID
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
enum EventVisibility {
|
|
336
|
+
PUBLIC
|
|
337
|
+
PRIVATE
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
enum EventStatus {
|
|
341
|
+
DRAFT
|
|
342
|
+
PUBLISHED
|
|
343
|
+
PENDING
|
|
344
|
+
CANCELLED
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
enum MediaType {
|
|
348
|
+
image
|
|
349
|
+
video
|
|
350
|
+
audio
|
|
351
|
+
pdf
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
enum NotificationType {
|
|
355
|
+
NEW_MESSAGE
|
|
356
|
+
EVENT_REMINDER
|
|
357
|
+
EVENT_PARTICIPATION_CONFIRMATION
|
|
358
|
+
EVENT_VALIDATION
|
|
359
|
+
EVENT_REJECTION
|
|
360
|
+
EVENT_ASSIGNMENT
|
|
361
|
+
EVENT_ASSIGNMENT_APPROVAL
|
|
362
|
+
EVENT_ASSIGNMENT_REJECTION
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
enum ProviderStatus {
|
|
366
|
+
PENDING
|
|
367
|
+
APPROVED
|
|
368
|
+
REJECTED
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
enum OrderStatus {
|
|
372
|
+
PENDING
|
|
373
|
+
CONFIRMED
|
|
374
|
+
CANCELLED
|
|
375
|
+
REFUNDED
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
enum PaymentStatus {
|
|
379
|
+
PENDING
|
|
380
|
+
COMPLETED
|
|
381
|
+
FAILED
|
|
382
|
+
REFUNDED
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
model Newsletter {
|
|
386
|
+
id String @id @default(cuid())
|
|
387
|
+
email String @unique
|
|
388
|
+
unsubscribedAt DateTime?
|
|
389
|
+
|
|
390
|
+
createdAt DateTime @default(now())
|
|
391
|
+
updatedAt DateTime @updatedAt
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
enum PricingType {
|
|
395
|
+
EVENT_CREATOR
|
|
396
|
+
PROVIDER
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
enum PricingDuration {
|
|
400
|
+
WEEKLY
|
|
401
|
+
BI_WEEKLY
|
|
402
|
+
MONTHLY
|
|
403
|
+
YEARLY
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
model Pricing {
|
|
407
|
+
id String @id @default(cuid())
|
|
408
|
+
title String
|
|
409
|
+
subtitle String
|
|
410
|
+
|
|
411
|
+
priceSuffix String?
|
|
412
|
+
|
|
413
|
+
features String[]
|
|
414
|
+
|
|
415
|
+
type PricingType @default(EVENT_CREATOR)
|
|
416
|
+
duration PricingDuration @default(MONTHLY)
|
|
417
|
+
amount Float
|
|
418
|
+
|
|
419
|
+
createdAt DateTime @default(now())
|
|
420
|
+
updatedAt DateTime @updatedAt
|
|
421
|
+
transactions Transaction[]
|
|
422
|
+
active Boolean @default(true)
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
enum PaymentMethod {
|
|
426
|
+
MOBILE_MONEY
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
enum TransactionStatus {
|
|
430
|
+
PENDING
|
|
431
|
+
COMPLETED
|
|
432
|
+
FAILED
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
model Transaction {
|
|
436
|
+
id String @id @default(cuid())
|
|
437
|
+
|
|
438
|
+
amount Float
|
|
439
|
+
paymentMethod PaymentMethod @default(MOBILE_MONEY)
|
|
440
|
+
|
|
441
|
+
pricingId String?
|
|
442
|
+
pricing Pricing? @relation(fields: [pricingId], references: [id])
|
|
443
|
+
|
|
444
|
+
userId String
|
|
445
|
+
user User @relation(fields: [userId], references: [id])
|
|
446
|
+
|
|
447
|
+
status TransactionStatus @default(PENDING)
|
|
448
|
+
|
|
449
|
+
reference String?
|
|
450
|
+
|
|
451
|
+
expiresAt DateTime?
|
|
452
|
+
|
|
453
|
+
createdAt DateTime @default(now())
|
|
454
|
+
updatedAt DateTime @updatedAt
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
model Feedback {
|
|
458
|
+
id String @id @default(cuid())
|
|
459
|
+
category String
|
|
460
|
+
rating Int
|
|
461
|
+
comment String
|
|
462
|
+
email String?
|
|
463
|
+
userId String?
|
|
464
|
+
user User? @relation(fields: [userId], references: [id])
|
|
465
|
+
|
|
466
|
+
createdAt DateTime @default(now())
|
|
467
|
+
updatedAt DateTime @updatedAt
|
|
468
|
+
}
|
package/.env.example
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
DATABASE_URL="postgresql://postgres:admin@localhost:5433/titomeet-dev?schema=public"
|