careerty-prism 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.
Files changed (62) hide show
  1. package/.env +27 -0
  2. package/index.d.ts +1 -0
  3. package/index.ts +1 -0
  4. package/package.json +14 -0
  5. package/prisma/migrations/20240131014313_1_31/migration.sql +826 -0
  6. package/prisma/migrations/20240131014532_1_31/migration.sql +2 -0
  7. package/prisma/migrations/20240131015628_1_31/migration.sql +31 -0
  8. package/prisma/migrations/20240131024601_1_31/migration.sql +14 -0
  9. package/prisma/migrations/20240131033222_1_31/migration.sql +12 -0
  10. package/prisma/migrations/20240131170511_1_31/migration.sql +8 -0
  11. package/prisma/migrations/20240131171610_1_31/migration.sql +2 -0
  12. package/prisma/migrations/20240201001741_2_1/migration.sql +12 -0
  13. package/prisma/migrations/20240201170231_2_1/migration.sql +33 -0
  14. package/prisma/migrations/20240201171252_2_1/migration.sql +14 -0
  15. package/prisma/migrations/20240201192306_2_1/migration.sql +8 -0
  16. package/prisma/migrations/20240202002716_2_2/migration.sql +41 -0
  17. package/prisma/migrations/20240202003711_2_2/migration.sql +27 -0
  18. package/prisma/migrations/20240202004845_2_2/migration.sql +17 -0
  19. package/prisma/migrations/20240202012224_2_2/migration.sql +3 -0
  20. package/prisma/migrations/20240202014349_2_2/migration.sql +12 -0
  21. package/prisma/migrations/20240202022643_2_2/migration.sql +8 -0
  22. package/prisma/migrations/20240202023205_2_2/migration.sql +2 -0
  23. package/prisma/migrations/20240202172053_2_2/migration.sql +8 -0
  24. package/prisma/migrations/20240202182337_2_2/migration.sql +11 -0
  25. package/prisma/migrations/20240202182555_2_2/migration.sql +2 -0
  26. package/prisma/migrations/20240202182943_2_2/migration.sql +10 -0
  27. package/prisma/migrations/20240205035515_2_5/migration.sql +8 -0
  28. package/prisma/migrations/20240208153622_2_8/migration.sql +2 -0
  29. package/prisma/migrations/20240209192820_2_9/migration.sql +56 -0
  30. package/prisma/migrations/20240209201256_2_9/migration.sql +2 -0
  31. package/prisma/migrations/20240209201932_2_9/migration.sql +3 -0
  32. package/prisma/migrations/20240209205002_2_9/migration.sql +24 -0
  33. package/prisma/migrations/20240210022055_2_10/migration.sql +53 -0
  34. package/prisma/migrations/20240212020505_2_12/migration.sql +12 -0
  35. package/prisma/migrations/20240213001607_2_13/migration.sql +12 -0
  36. package/prisma/migrations/20240213001720_2_13/migration.sql +2 -0
  37. package/prisma/migrations/20240213193248_2_13/migration.sql +17 -0
  38. package/prisma/migrations/20240213195316_2_13/migration.sql +8 -0
  39. package/prisma/migrations/20240213200814_2_13/migration.sql +12 -0
  40. package/prisma/migrations/20240213203646_2_13/migration.sql +18 -0
  41. package/prisma/migrations/20240217003442_2_17/migration.sql +17 -0
  42. package/prisma/migrations/20240221011736_2_21/migration.sql +2 -0
  43. package/prisma/migrations/20240221214416_2_22/migration.sql +8 -0
  44. package/prisma/migrations/20240221221830_2_22/migration.sql +8 -0
  45. package/prisma/migrations/20240225134814_2_25/migration.sql +53 -0
  46. package/prisma/migrations/20240225142256_2_25/migration.sql +8 -0
  47. package/prisma/migrations/20240225142848_2_25/migration.sql +3 -0
  48. package/prisma/migrations/20240225154637_2_25/migration.sql +8 -0
  49. package/prisma/migrations/20240225180355_2_25/migration.sql +2 -0
  50. package/prisma/migrations/20240225181039_2_25/migration.sql +2 -0
  51. package/prisma/migrations/20240301180300_3_1/migration.sql +90 -0
  52. package/prisma/migrations/20240303155506_3_3/migration.sql +3 -0
  53. package/prisma/migrations/20240304105912_3_4/migration.sql +29 -0
  54. package/prisma/migrations/20240304161556_3_4/migration.sql +8 -0
  55. package/prisma/migrations/20240304171222_3_4/migration.sql +32 -0
  56. package/prisma/migrations/20240307155903_3_7/migration.sql +12 -0
  57. package/prisma/migrations/20240307160710_3_7/migration.sql +8 -0
  58. package/prisma/migrations/20240307161842_3_7/migration.sql +8 -0
  59. package/prisma/migrations/20240309134547_3_9/migration.sql +2 -0
  60. package/prisma/migrations/20240324192008_3_24/migration.sql +12 -0
  61. package/prisma/migrations/migration_lock.toml +3 -0
  62. package/prisma/schema.prisma +899 -0
@@ -0,0 +1,899 @@
1
+ // This is your Prisma schema file,
2
+ // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
+
4
+ generator client {
5
+ provider = "prisma-client-js"
6
+ }
7
+
8
+ datasource db {
9
+ provider = "mysql"
10
+ url = env("DATABASE_URL")
11
+ }
12
+
13
+ enum SubscriptionStatus {
14
+ ACTIVE
15
+ INACTIVE
16
+ EXPIRED
17
+ PENDING
18
+ }
19
+
20
+ enum PaymentMethod {
21
+ PAYPAL
22
+ STRIPE
23
+ COUPON_FREE_ITEM
24
+ }
25
+
26
+ enum CouponType {
27
+ Free_PLAN
28
+ Free_TRANSACTION
29
+ Free_GPT
30
+ }
31
+
32
+ enum ReferralActionTrigger {
33
+ USER_REGISTRATION
34
+ }
35
+
36
+ enum MnProgramRequestLectureStatus {
37
+ PENDING
38
+ PLANNED
39
+ CANCELED
40
+ DONE
41
+ }
42
+
43
+ enum AiChatQuestionSection {
44
+ CV
45
+ CL
46
+ }
47
+
48
+ enum AiChatQuestionType {
49
+ Main
50
+ Sub
51
+ }
52
+
53
+ enum AiChatQuestionWidget {
54
+ ENTER_NAME
55
+ SELECT_POSITION
56
+ SELECT_TEMPLATE
57
+ SELECT_SKILL
58
+ SELECT_DATE
59
+ TEXT
60
+ NONE
61
+ }
62
+
63
+ enum AiChatHistoryType {
64
+ QUESTION
65
+ QUESTION_ANSWER
66
+ USER_ANSWER
67
+ }
68
+
69
+ enum ApprovalRequestModel {
70
+ MENTOR
71
+ MNPROGRAM
72
+ }
73
+ enum ApprovalRequestState {
74
+ PENDING
75
+ APPROVED
76
+ REJECTED
77
+ }
78
+
79
+
80
+ model Config {
81
+ id Int @id @default(autoincrement())
82
+ configName String @unique
83
+ configType String
84
+ configInput String
85
+ configStatus Int @default(1)
86
+ configValue String
87
+ configSubValue String?
88
+ configDesc String
89
+ }
90
+
91
+ model User {
92
+ id Int @id @default(autoincrement())
93
+ email String @unique
94
+ name String
95
+ username String
96
+ password String
97
+ referralId Int? @unique
98
+ status Int @default(0)
99
+ isBanned Boolean @default(false)
100
+ createdAt DateTime @default(now())
101
+ updatedAt DateTime @updatedAt
102
+ subscriptions Subscription[]
103
+ cvs CV[]
104
+ cls CL[]
105
+ ServiceRequest ServiceRequest[]
106
+ Mentor Mentor[]
107
+ UserMeta UserMeta[]
108
+ MnProgramRequest MnProgramRequest[]
109
+ Order Order[]
110
+ UserCoupon UserCoupon[]
111
+ Referral Referral? @relation(fields: [referralId], references: [id])
112
+ UserAvailablity UserAvailablity[]
113
+ AiCvChat AiCvChat[]
114
+ }
115
+
116
+ model UserMeta {
117
+ id Int @id @default(autoincrement())
118
+ key String
119
+ value String
120
+ userId Int
121
+ User User @relation(fields: [userId], references: [id])
122
+ }
123
+
124
+ model UserCoupon {
125
+ id Int @id @default(autoincrement())
126
+ userId Int
127
+ couponId Int
128
+ User User @relation(fields: [userId], references: [id])
129
+ Coupon Coupon @relation(fields: [couponId], references: [id])
130
+ }
131
+
132
+ model UserAvailablity {
133
+ id Int @id @default(autoincrement())
134
+ day String
135
+ status Boolean @default(false)
136
+ userId Int
137
+ slots UserAvailablitySlot[]
138
+ User User @relation(fields: [userId], references: [id])
139
+ }
140
+
141
+ model UserAvailablitySlot {
142
+ id Int @id @default(autoincrement())
143
+ start String?
144
+ end String?
145
+ userAvailablityId Int
146
+ UserAvailablity UserAvailablity @relation(fields: [userAvailablityId], references: [id])
147
+ }
148
+
149
+ model Referral {
150
+ id Int @id @default(autoincrement())
151
+ userId Int @unique
152
+ code String @unique
153
+ ReferralEvent ReferralEvent[]
154
+ ReferralRewardRedemption ReferralRewardRedemption[]
155
+ User User?
156
+ }
157
+
158
+ model ReferralAction {
159
+ id Int @id @default(autoincrement())
160
+ name String
161
+ key String @unique
162
+ value String
163
+ trigger ReferralActionTrigger
164
+ status Boolean @default(false)
165
+ isDeleted Boolean @default(false)
166
+ rewardId Int?
167
+ Reward ReferralReward? @relation(fields: [rewardId], references: [id])
168
+ ReferralEvent ReferralEvent[]
169
+ }
170
+
171
+ model ReferralReward {
172
+ id Int @id @default(autoincrement())
173
+ actionId Int
174
+ model String
175
+ modelId String
176
+ isRedeemed Boolean @default(false)
177
+ expirationDate DateTime? // Date when the reward expires
178
+ // Add other fields as necessary for your specific reward details
179
+ ReferralAction ReferralAction[]
180
+ ReferralRewardRedemption ReferralRewardRedemption[]
181
+ }
182
+
183
+ model ReferralEvent {
184
+ id Int @id @default(autoincrement())
185
+ referralActionId Int
186
+ referralId Int
187
+ timestamp DateTime @default(now())
188
+ Action ReferralAction @relation(fields: [referralActionId], references: [id])
189
+ Referral Referral @relation(fields: [referralId], references: [id])
190
+ }
191
+
192
+ model ReferralRewardRedemption {
193
+ id Int @id @default(autoincrement())
194
+ referralId Int
195
+ rewardId Int
196
+ Referral Referral @relation(fields: [referralId], references: [id])
197
+ Reward ReferralReward @relation(fields: [rewardId], references: [id])
198
+ }
199
+
200
+ model Plan {
201
+ id Int @id @default(autoincrement())
202
+ name String
203
+ isDeleted Boolean @default(false)
204
+ status Boolean @default(false)
205
+ planPaypalId String?
206
+ permalink String @unique
207
+ subscriptions Subscription[]
208
+ planPerkValue PlanPerkValue[]
209
+ planTranslation PlanTranslation[]
210
+ }
211
+
212
+ model PlanTranslation {
213
+ id Int @id @default(autoincrement())
214
+ key String
215
+ value String
216
+ lang String
217
+ Plan Plan @relation(fields: [planId], references: [id])
218
+ planId Int
219
+ }
220
+
221
+ model PlanPerk {
222
+ id Int @id @default(autoincrement())
223
+ key String
224
+ name String
225
+ description String
226
+ status Boolean @default(false)
227
+ value String
228
+ translations PlanPerkTranlation[]
229
+ PlanPerkValue PlanPerkValue[]
230
+ }
231
+
232
+ model PlanPerkValue {
233
+ id Int @id @default(autoincrement())
234
+ planId Int
235
+ plan Plan @relation(fields: [planId], references: [id])
236
+ planPerkId Int
237
+ planPerk PlanPerk @relation(fields: [planPerkId], references: [id])
238
+ value String
239
+ }
240
+
241
+ model PlanPerkTranlation {
242
+ id Int @id @default(autoincrement())
243
+ key String
244
+ value String
245
+ lang String
246
+ planPerkId Int
247
+ planPerk PlanPerk @relation(fields: [planPerkId], references: [id])
248
+ }
249
+
250
+ model Subscription {
251
+ id Int @id @default(autoincrement())
252
+ userId Int
253
+ user User @relation(fields: [userId], references: [id])
254
+ planId Int
255
+ plan Plan @relation(fields: [planId], references: [id])
256
+ status SubscriptionStatus @default(PENDING)
257
+ createdAt DateTime @default(now())
258
+ updatedAt DateTime @updatedAt
259
+ SubscriptionCancellation SubscriptionCancellation[]
260
+ }
261
+
262
+ model SubscriptionCancellation {
263
+ id Int @id @default(autoincrement())
264
+ reason String
265
+ cancelAt DateTime
266
+ status Boolean @default(false)
267
+ subscriptionId Int
268
+ Subscription Subscription @relation(fields: [subscriptionId], references: [id])
269
+ createdAt DateTime @default(now())
270
+ updatedAt DateTime @updatedAt
271
+ }
272
+
273
+ model Template {
274
+ id Int @id @default(autoincrement())
275
+ name String
276
+ description String
277
+ status Boolean @default(false)
278
+ for String
279
+ price Int @default(0)
280
+ isPaid Boolean
281
+ isMultiSide Boolean @default(false)
282
+ isDeleted Boolean @default(false)
283
+ templateMeta TemplateMeta[]
284
+
285
+ thumbnailId Int
286
+ thumbnail Upload @relation(fields: [thumbnailId], references: [id])
287
+ CV CV[]
288
+ }
289
+
290
+ model TemplateMeta {
291
+ id Int @id @default(autoincrement())
292
+ key String
293
+ value String
294
+ model String?
295
+ Template Template @relation(fields: [templateId], references: [id])
296
+ templateId Int
297
+ }
298
+
299
+ model CV {
300
+ id Int @id @default(autoincrement())
301
+ permalink String @unique
302
+ fullname String
303
+ profile String @db.LongText
304
+ address String
305
+ position String
306
+ language String
307
+ sections Json
308
+ isDeleted Boolean @default(false)
309
+ templateId Int
310
+ template Template @relation(fields: [templateId], references: [id])
311
+ userId Int
312
+ user User @relation(fields: [userId], references: [id])
313
+ experiences CvExperience[]
314
+ educations CvEducation[]
315
+ skills CvSkill[]
316
+ projects CvProject[]
317
+ organizations CvOrganization[]
318
+ awards CvAward[]
319
+ references CvReference[]
320
+ contacts CvContact[]
321
+ metas CvMeta[]
322
+ createdAt DateTime @default(now())
323
+ updatedAt DateTime @updatedAt
324
+ chat AiCvChat?
325
+ }
326
+
327
+ model CvExperience {
328
+ id Int @id @default(autoincrement())
329
+ title String?
330
+ description String?
331
+ at String?
332
+ from DateTime?
333
+ to DateTime?
334
+ sort Int
335
+ status Int
336
+ CV CV @relation(fields: [cvId], references: [id])
337
+ cvId Int
338
+ }
339
+
340
+ model CvEducation {
341
+ id Int @id @default(autoincrement())
342
+ title String?
343
+ description String?
344
+ at String?
345
+ from DateTime?
346
+ to DateTime?
347
+ sort Int
348
+ status Int
349
+ CV CV @relation(fields: [cvId], references: [id])
350
+ cvId Int
351
+ }
352
+
353
+ model CvContact {
354
+ id Int @id @default(autoincrement())
355
+ key String?
356
+ value String?
357
+ sort Int
358
+ cvId Int
359
+ contactRepoId Int?
360
+ Cv CV @relation(fields: [cvId], references: [id])
361
+ ContactRepo ContactRepo? @relation(fields: [contactRepoId], references: [id])
362
+ }
363
+
364
+ model CvSkill {
365
+ id Int @id @default(autoincrement())
366
+ title String?
367
+ description String?
368
+ value String?
369
+ color String
370
+ sort Int
371
+ CV CV @relation(fields: [cvId], references: [id])
372
+ cvId Int
373
+ }
374
+
375
+ model CvProject {
376
+ id Int @id @default(autoincrement())
377
+ title String?
378
+ description String?
379
+ job String?
380
+ date DateTime?
381
+ sort Int
382
+ CV CV @relation(fields: [cvId], references: [id])
383
+ cvId Int
384
+ }
385
+
386
+ model CvOrganization {
387
+ id Int @id @default(autoincrement())
388
+ title String?
389
+ description String?
390
+ job String?
391
+ from DateTime?
392
+ to DateTime?
393
+ sort Int
394
+ status Int
395
+ CV CV @relation(fields: [cvId], references: [id])
396
+ cvId Int
397
+ }
398
+
399
+ model CvAward {
400
+ id Int @id @default(autoincrement())
401
+ title String?
402
+ description String?
403
+ job String?
404
+ date DateTime?
405
+ sort Int
406
+ status Int
407
+ CV CV @relation(fields: [cvId], references: [id])
408
+ cvId Int
409
+ }
410
+
411
+ model CvReference {
412
+ id Int @id @default(autoincrement())
413
+ name String?
414
+ position String?
415
+ mail String?
416
+ phone String?
417
+ at String?
418
+ sort Int
419
+ status Int
420
+ Cv CV @relation(fields: [cvId], references: [id])
421
+ cvId Int
422
+ }
423
+
424
+ model CvMeta {
425
+ id Int @id @default(autoincrement())
426
+ key String
427
+ value String
428
+ metaModel String
429
+ CV CV @relation(fields: [cvId], references: [id])
430
+ cvId Int
431
+ }
432
+
433
+ model CL {
434
+ id Int @id @default(autoincrement())
435
+ userId Int
436
+ user User @relation(fields: [userId], references: [id])
437
+ }
438
+
439
+ model AiChatQuestion {
440
+ id Int @id @default(autoincrement())
441
+ sort Int
442
+ parentId Int?
443
+ section AiChatQuestionSection
444
+ type AiChatQuestionType
445
+ widget AiChatQuestionWidget
446
+ action String
447
+ isDeleted Boolean @default(false)
448
+ status Boolean @default(false)
449
+ isRequired Boolean @default(true)
450
+ AiParentChatQuestion AiChatQuestion? @relation("ChatQuestionToParent", fields: [parentId], references: [id])
451
+ AiChildChatQuestions AiChatQuestion[] @relation("ChatQuestionToParent")
452
+ AiChatAnswer AiChatAnswer[]
453
+ AiChatQuestionTranslation AiChatQuestionTranslation[]
454
+ AiCvChatHistory AiCvChatHistory[]
455
+ }
456
+
457
+ model AiChatQuestionTranslation {
458
+ id Int @id @default(autoincrement())
459
+ key String
460
+ value String
461
+ lang String
462
+ chatQuestionId Int
463
+ ChatQuestion AiChatQuestion @relation(fields: [chatQuestionId], references: [id])
464
+ }
465
+
466
+ model AiChatAnswer {
467
+ id Int @id @default(autoincrement())
468
+ chatQuestionId Int
469
+ sort Int
470
+ isDeleted Boolean @default(false)
471
+ status Boolean @default(false)
472
+ AiChatQuestion AiChatQuestion @relation(fields: [chatQuestionId], references: [id])
473
+ AiChatAwnserTranslation AiChatAwnserTranslation[]
474
+ AiCvChatHistory AiCvChatHistory[]
475
+ }
476
+
477
+ model AiChatAwnserTranslation {
478
+ id Int @id @default(autoincrement())
479
+ key String
480
+ value String
481
+ lang String
482
+ chatAnswerId Int
483
+ chatAnswer AiChatAnswer @relation(fields: [chatAnswerId], references: [id])
484
+ }
485
+
486
+ model AiCvChat {
487
+ id Int @id @default(autoincrement())
488
+ userId Int
489
+ cVId Int @unique
490
+ Cv CV @relation(fields: [cVId], references: [id])
491
+ User User @relation(fields: [userId], references: [id])
492
+ History AiCvChatHistory[]
493
+ }
494
+
495
+ model AiCvChatHistory {
496
+ id Int @id @default(autoincrement())
497
+ type AiChatHistoryType
498
+ aiChatId Int
499
+ questionId Int?
500
+ answerId Int?
501
+ payload String
502
+ question AiChatQuestion? @relation(fields: [questionId], references: [id])
503
+ answer AiChatAnswer? @relation(fields: [answerId], references: [id])
504
+ AiChat AiCvChat @relation(fields: [aiChatId], references: [id])
505
+ }
506
+
507
+ model Mentor {
508
+ id Int @id @default(autoincrement())
509
+ name String
510
+ description String
511
+ email String @unique
512
+ phone String
513
+ password String
514
+ status Int @default(1)
515
+ isDeleted Boolean @default(false)
516
+ isBanned Boolean @default(false)
517
+ thumbnailId Int
518
+ userId Int
519
+ createdAt DateTime @default(now())
520
+ updatedAt DateTime @updatedAt
521
+ user User @relation(fields: [userId], references: [id])
522
+ thumbnail Upload @relation(fields: [thumbnailId], references: [id])
523
+ ServiceMentor ServiceMentor[]
524
+ ServiceRequest ServiceRequest[]
525
+ MnProgramMentor MnProgramMentor[]
526
+ MnProgramRequest MnProgramRequest[]
527
+ MentorAvailablity MentorAvailablity[]
528
+ // MnProgramMeet MnProgramMeet[]
529
+ }
530
+
531
+ model MentorAvailablity {
532
+ id Int @id @default(autoincrement())
533
+ day String
534
+ status Boolean @default(false)
535
+ mentorId Int
536
+ Mentor Mentor @relation(fields: [mentorId], references: [id])
537
+ slots MentorAvailablitySlot[]
538
+ }
539
+
540
+ model MentorAvailablitySlot {
541
+ id Int @id @default(autoincrement())
542
+ start String?
543
+ end String?
544
+ mentorAvailablityId Int
545
+ MentorAvailablity MentorAvailablity @relation(fields: [mentorAvailablityId], references: [id])
546
+ }
547
+
548
+ model Service {
549
+ id Int @id @default(autoincrement())
550
+ name String
551
+ description String
552
+ fullPrice Int
553
+ commission Int
554
+ status Boolean @default(false)
555
+ thumbnailId Int
556
+ permalink String @unique
557
+ isDeleted Boolean @default(false)
558
+ Thumbnail Upload @relation(fields: [thumbnailId], references: [id])
559
+ translations ServiceTranlstion[]
560
+ ServiceMentor ServiceMentor[]
561
+ ServiceRequest ServiceRequest[]
562
+ }
563
+
564
+ model ServiceTranlstion {
565
+ id Int @id @default(autoincrement())
566
+ key String
567
+ value String
568
+ lang String
569
+ serviceId Int
570
+ Service Service @relation(fields: [serviceId], references: [id])
571
+ }
572
+
573
+ model ServiceMentor {
574
+ id Int @id @default(autoincrement())
575
+ mentorId Int
576
+ serviceId Int
577
+ Mentor Mentor @relation(fields: [mentorId], references: [id])
578
+ Service Service @relation(fields: [serviceId], references: [id])
579
+ createdAt DateTime @default(now())
580
+ updatedAt DateTime @updatedAt
581
+ }
582
+
583
+ model ServiceRequest {
584
+ id Int @id @default(autoincrement())
585
+ isPending Boolean @default(true)
586
+ isInProgress Boolean @default(false)
587
+ isCompleted Boolean @default(false)
588
+ isCanceled Boolean @default(false)
589
+ userId Int
590
+ mentorId Int?
591
+ serviceId Int
592
+ orderId Int
593
+ permalink String @unique
594
+ Service Service @relation(fields: [serviceId], references: [id])
595
+ Order Order @relation(fields: [orderId], references: [id])
596
+ User User @relation(fields: [userId], references: [id])
597
+ mentor Mentor? @relation(fields: [mentorId], references: [id])
598
+ createdAt DateTime @default(now())
599
+ updatedAt DateTime @updatedAt
600
+ }
601
+
602
+ model MnProgram {
603
+ id Int @id @default(autoincrement())
604
+ name String
605
+ description String
606
+ status Boolean @default(false)
607
+ folder String
608
+ meetCount Int
609
+ thumbnailId Int
610
+ fullPrice Int
611
+ commission Int
612
+ isDeleted Boolean @default(false)
613
+ permalink String @unique
614
+ createdAt DateTime @default(now())
615
+ updatedAt DateTime @updatedAt
616
+ MnProgramMentor MnProgramMentor[]
617
+ Thumbnail Upload @relation(fields: [thumbnailId], references: [id])
618
+ MnProgramRequest MnProgramRequest[]
619
+ MnProgramPreparation MnProgramPreparation[]
620
+ translations MnProgramTranslation[]
621
+ }
622
+
623
+ model MnProgramMentor {
624
+ id Int @id @default(autoincrement())
625
+ mentorId Int
626
+ Mentor Mentor @relation(fields: [mentorId], references: [id])
627
+ MnProgram MnProgram @relation(fields: [mnProgramId], references: [id])
628
+ createdAt DateTime @default(now())
629
+ updatedAt DateTime @updatedAt
630
+ mnProgramId Int
631
+ }
632
+
633
+ model MnProgramTranslation {
634
+ id Int @id @default(autoincrement())
635
+ key String
636
+ value String
637
+ lang String
638
+ MnProgram MnProgram @relation(fields: [mnProgramId], references: [id])
639
+ mnProgramId Int
640
+ }
641
+
642
+ model MnProgramPreparation {
643
+ id Int @id @default(autoincrement())
644
+ name String
645
+ mnProgramMeetId Int
646
+ folder String
647
+ mnProgramId Int
648
+ MnProgram MnProgram @relation(fields: [mnProgramId], references: [id])
649
+ MnProgramPreparationAttachment MnProgramPreparationAttachment[]
650
+ }
651
+
652
+ model MnProgramPreparationAttachment {
653
+ id Int @id @default(autoincrement())
654
+ name String
655
+ mnProgramPreparationId Int
656
+ attachmentId Int
657
+ PreparationAttachment Upload @relation(fields: [attachmentId], references: [id])
658
+ MnProgramPreparation MnProgramPreparation @relation(fields: [mnProgramPreparationId], references: [id])
659
+ }
660
+
661
+ model MnProgramRequest {
662
+ id Int @id @default(autoincrement())
663
+ isPending Boolean @default(false)
664
+ isInProgress Boolean @default(false)
665
+ isCompleted Boolean @default(false)
666
+ isCanceled Boolean @default(false)
667
+ userId Int
668
+ mentorId Int?
669
+ mnProgramId Int
670
+ orderId Int
671
+ permalink String @unique
672
+ createdAt DateTime @default(now())
673
+ updatedAt DateTime @updatedAt
674
+ User User @relation(fields: [userId], references: [id])
675
+ Mentor Mentor? @relation(fields: [mentorId], references: [id])
676
+ MnProgram MnProgram @relation(fields: [mnProgramId], references: [id])
677
+ Order Order @relation(fields: [orderId], references: [id])
678
+ MnProgramRequestAvailablity MnProgramRequestAvailablity[]
679
+ MnProgramRequestLecture MnProgramRequestLecture[]
680
+ }
681
+
682
+ model MnProgramRequestAvailablity {
683
+ id Int @id @default(autoincrement())
684
+ day String
685
+ mnProgramRequestId Int
686
+ slots MnProgramRequestAvailablitySlot[]
687
+ MnProgramRequest MnProgramRequest @relation(fields: [mnProgramRequestId], references: [id])
688
+ }
689
+
690
+ model MnProgramRequestAvailablitySlot {
691
+ id Int @id @default(autoincrement())
692
+ start String
693
+ end String
694
+ mnProgramRequestAvailablityId Int
695
+ MnProgramRequestAvailablity MnProgramRequestAvailablity @relation(fields: [mnProgramRequestAvailablityId], references: [id])
696
+ MnProgramRequestLectureSession MnProgramRequestLectureSession[]
697
+ }
698
+
699
+ model MnProgramRequestLecture {
700
+ id Int @id @default(autoincrement())
701
+ status MnProgramRequestLectureStatus @default(PENDING)
702
+ at DateTime?
703
+ mnProgramRequestId Int
704
+ mnProgramRequest MnProgramRequest @relation(fields: [mnProgramRequestId], references: [id])
705
+ MnProgramRequestLectureSession MnProgramRequestLectureSession[]
706
+ }
707
+
708
+ model MnProgramRequestLectureSession {
709
+ id Int @id @default(autoincrement())
710
+ permalink String @unique
711
+ mnProgramRequestAvailablitySlotId Int
712
+ mnProgramRequestLectureId Int
713
+ createdAt DateTime @default(now())
714
+ updatedAt DateTime @updatedAt
715
+ MnProgramRequestAvailablitySlot MnProgramRequestAvailablitySlot @relation(fields: [mnProgramRequestAvailablitySlotId], references: [id])
716
+ MnProgramRequestLecture MnProgramRequestLecture @relation(fields: [mnProgramRequestLectureId], references: [id])
717
+ MnProgramRequestLectureSessionAttachment MnProgramRequestLectureSessionAttachment[]
718
+ }
719
+
720
+ model MnProgramRequestLectureSessionAttachment {
721
+ id Int @id @default(autoincrement())
722
+ uploadId Int
723
+ mnProgramRequestLectureSessionId Int
724
+ by String
725
+ MnProgramRequestLectureSession MnProgramRequestLectureSession @relation(fields: [mnProgramRequestLectureSessionId], references: [id])
726
+ Upload Upload @relation(fields: [uploadId], references: [id])
727
+ }
728
+
729
+ model Upload {
730
+ id Int @id @default(autoincrement())
731
+ filename String
732
+ extention String
733
+ path String
734
+ size Int
735
+ modelId Int
736
+ model String
737
+ Mentor Mentor[]
738
+ Template Template[]
739
+ Service Service[]
740
+ createdAt DateTime @default(now())
741
+ updatedAt DateTime @updatedAt
742
+ FontRepo FontRepo[]
743
+ MnProgram MnProgram[]
744
+ MnProgramPreparationAttachment MnProgramPreparationAttachment[]
745
+ MnProgramRequestLectureSessionAttachment MnProgramRequestLectureSessionAttachment[]
746
+ }
747
+
748
+ model Order {
749
+ id Int @id @default(autoincrement())
750
+ paid Boolean @default(false)
751
+ isPending Boolean @default(false)
752
+ isPaid Boolean @default(false)
753
+ userId Int
754
+ modelId Int
755
+ model String
756
+ paymentId Int @unique
757
+ Payment Payment @relation(fields: [paymentId], references: [id])
758
+ User User @relation(fields: [userId], references: [id])
759
+ ServiceRequest ServiceRequest[]
760
+ createdAt DateTime @default(now())
761
+ updatedAt DateTime @updatedAt
762
+ MnProgramRequest MnProgramRequest[]
763
+ }
764
+
765
+ model Payment {
766
+ id Int @id @default(autoincrement())
767
+ token String @unique
768
+ method PaymentMethod
769
+ details Json
770
+ Order Order?
771
+ createdAt DateTime @default(now())
772
+ updatedAt DateTime @updatedAt
773
+ }
774
+
775
+ model CouponCollection {
776
+ id Int @id @default(autoincrement())
777
+ name String
778
+ isDeleted Boolean @default(false)
779
+ coupons Coupon[]
780
+ createdAt DateTime @default(now())
781
+ updatedAt DateTime @updatedAt
782
+ }
783
+
784
+ model Coupon {
785
+ id Int @id @default(autoincrement())
786
+ type CouponType
787
+ value String
788
+ model String
789
+ modelId String
790
+ expireDate DateTime
791
+ code String @unique
792
+ status Boolean @default(false)
793
+ isRedeemed Boolean @default(false)
794
+ collectionId Int
795
+ createdAt DateTime @default(now())
796
+ updatedAt DateTime @updatedAt
797
+ redeemedAt DateTime?
798
+ CouponCollection CouponCollection @relation(fields: [collectionId], references: [id])
799
+ UserCoupon UserCoupon[]
800
+ }
801
+
802
+ model ColorRepo {
803
+ id Int @id @default(autoincrement())
804
+ name String
805
+ hex String
806
+ status Boolean @default(false)
807
+ isDeleted Boolean @default(false)
808
+ translations ColorRepoTranslation[]
809
+ }
810
+
811
+ model ColorRepoTranslation {
812
+ id Int @id @default(autoincrement())
813
+ key String
814
+ value String
815
+ lang String
816
+ ColorRepo ColorRepo @relation(fields: [colorRepoId], references: [id])
817
+ colorRepoId Int
818
+ }
819
+
820
+ model ContactRepo {
821
+ id Int @id @default(autoincrement())
822
+ name String
823
+ icon String
824
+ status Boolean @default(false)
825
+ translations ContactRepoTranslation[]
826
+ isDeleted Boolean @default(false)
827
+ CvContact CvContact[]
828
+ }
829
+
830
+ model ContactRepoTranslation {
831
+ id Int @id @default(autoincrement())
832
+ key String
833
+ value String
834
+ lang String
835
+ ContactRepo ContactRepo @relation(fields: [contactRepoId], references: [id])
836
+ contactRepoId Int
837
+ }
838
+
839
+ model FontRepo {
840
+ id Int @id @default(autoincrement())
841
+ name String
842
+ file Int?
843
+ status Boolean @default(false)
844
+ isDeleted Boolean @default(false)
845
+ File Upload? @relation(fields: [file], references: [id])
846
+ translations FontRepoTranslation[]
847
+ }
848
+
849
+ model FontRepoTranslation {
850
+ id Int @id @default(autoincrement())
851
+ key String
852
+ value String
853
+ lang String
854
+ FontRepo FontRepo @relation(fields: [fontRepoId], references: [id])
855
+ fontRepoId Int
856
+ }
857
+
858
+ model PositionRepo {
859
+ id Int @id @default(autoincrement())
860
+ name String
861
+ status Boolean @default(false)
862
+ translations PositionRepoTranslation[]
863
+ isDeleted Boolean @default(false)
864
+ }
865
+
866
+ model PositionRepoTranslation {
867
+ id Int @id @default(autoincrement())
868
+ key String
869
+ value String
870
+ lang String
871
+ positionRepoId Int
872
+ PositionRepo PositionRepo @relation(fields: [positionRepoId], references: [id])
873
+ }
874
+
875
+ model SkillRepo {
876
+ id Int @id @default(autoincrement())
877
+ name String
878
+ status Boolean @default(false)
879
+ translations SkillRepoTranslation[]
880
+ isDeleted Boolean @default(false)
881
+ }
882
+
883
+ model SkillRepoTranslation {
884
+ id Int @id @default(autoincrement())
885
+ key String
886
+ value String
887
+ lang String
888
+ skillRepoId Int
889
+ SkillRepo SkillRepo @relation(fields: [skillRepoId], references: [id])
890
+ }
891
+
892
+
893
+ model ApprovalRequest {
894
+ id Int @id @default(autoincrement())
895
+ model ApprovalRequestModel
896
+ modelId Int?
897
+ stautus ApprovalRequestState @default(PENDING)
898
+ changes String @db.LongText
899
+ }