careerty-prism 1.0.36 → 1.0.38

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/others/seeder.ts CHANGED
@@ -397,17 +397,17 @@ async function mentorshipAchievements(tx: any) {
397
397
  data:[
398
398
  {
399
399
  name:'10 mentorship hours',
400
- points:'0.01',
400
+ score:'0.01',
401
401
  thumbnailId:thumbnail.id,
402
402
  },
403
403
  {
404
404
  name:'100 mentorship hours',
405
- points:'0.10',
405
+ score:'0.10',
406
406
  thumbnailId:thumbnail.id,
407
407
  },
408
408
  {
409
409
  name:'1000 mentorship hours',
410
- points:'1.00',
410
+ score:'1.00',
411
411
  thumbnailId:thumbnail.id,
412
412
  }
413
413
  ]
@@ -509,6 +509,7 @@ async function mentors(tx :any) {
509
509
  thumbnailId: thumbnail.id,
510
510
  userId: user.id,
511
511
  status:true,
512
+
512
513
  }
513
514
  });
514
515
 
@@ -529,13 +530,12 @@ async function mentors(tx :any) {
529
530
  }
530
531
  }
531
532
  })
532
- });
533
-
534
- const achivements = await tx.mentorAchievement.findMany({});
535
- achivements.forEach(async (achivement: { id: any; }) => {
533
+ });
534
+ const achievements = await tx.mentorshipAchievement.findMany({});
535
+ achievements.forEach(async (achievement: { id: any; }) => {
536
536
  await tx.mentorAchievement.create({
537
537
  data:{
538
- achivementId:achivement.id,
538
+ achievementId:achievement.id,
539
539
  mentorId:mentor.id
540
540
  }
541
541
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "careerty-prism",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,85 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `points` on the `MentorshipAchievement` table. All the data in the column will be lost.
5
+ - Added the required column `is_featured` to the `Mentor` table without a default value. This is not possible if the table is not empty.
6
+ - Added the required column `score` to the `MentorshipAchievement` table without a default value. This is not possible if the table is not empty.
7
+
8
+ */
9
+ -- AlterTable
10
+ ALTER TABLE `Mentor` ADD COLUMN `isFeatured` BOOLEAN NOT NULL DEFAULT false,
11
+ ADD COLUMN `is_featured` BOOLEAN NOT NULL;
12
+
13
+ -- AlterTable
14
+ ALTER TABLE `MentorshipAchievement` DROP COLUMN `points`,
15
+ ADD COLUMN `score` VARCHAR(191) NOT NULL;
16
+
17
+ -- CreateTable
18
+ CREATE TABLE `MentorLanguage` (
19
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
20
+ `languageId` INTEGER NOT NULL,
21
+ `mentorId` INTEGER NOT NULL,
22
+
23
+ PRIMARY KEY (`id`)
24
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
25
+
26
+ -- CreateTable
27
+ CREATE TABLE `MentorReview` (
28
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
29
+ `description` VARCHAR(191) NOT NULL,
30
+ `rating` INTEGER NOT NULL,
31
+ `userId` INTEGER NOT NULL,
32
+ `mentorId` INTEGER NOT NULL,
33
+
34
+ PRIMARY KEY (`id`)
35
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
36
+
37
+ -- CreateTable
38
+ CREATE TABLE `MentorCertificate` (
39
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
40
+ `mentorId` INTEGER NOT NULL,
41
+ `name` VARCHAR(191) NOT NULL,
42
+ `description` VARCHAR(191) NULL,
43
+ `link` VARCHAR(191) NULL,
44
+
45
+ PRIMARY KEY (`id`)
46
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
47
+
48
+ -- CreateTable
49
+ CREATE TABLE `LanguageRepo` (
50
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
51
+ `name` VARCHAR(191) NOT NULL,
52
+ `status` BOOLEAN NOT NULL DEFAULT false,
53
+ `isDeleted` BOOLEAN NOT NULL DEFAULT false,
54
+
55
+ PRIMARY KEY (`id`)
56
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
57
+
58
+ -- CreateTable
59
+ CREATE TABLE `LanguageRepoTranslation` (
60
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
61
+ `key` VARCHAR(191) NOT NULL,
62
+ `value` VARCHAR(191) NOT NULL,
63
+ `lang` VARCHAR(191) NOT NULL,
64
+ `langRepoId` INTEGER NOT NULL,
65
+
66
+ PRIMARY KEY (`id`)
67
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
68
+
69
+ -- AddForeignKey
70
+ ALTER TABLE `MentorLanguage` ADD CONSTRAINT `MentorLanguage_languageId_fkey` FOREIGN KEY (`languageId`) REFERENCES `LanguageRepo`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
71
+
72
+ -- AddForeignKey
73
+ ALTER TABLE `MentorLanguage` ADD CONSTRAINT `MentorLanguage_mentorId_fkey` FOREIGN KEY (`mentorId`) REFERENCES `Mentor`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
74
+
75
+ -- AddForeignKey
76
+ ALTER TABLE `MentorReview` ADD CONSTRAINT `MentorReview_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
77
+
78
+ -- AddForeignKey
79
+ ALTER TABLE `MentorReview` ADD CONSTRAINT `MentorReview_mentorId_fkey` FOREIGN KEY (`mentorId`) REFERENCES `Mentor`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
80
+
81
+ -- AddForeignKey
82
+ ALTER TABLE `MentorCertificate` ADD CONSTRAINT `MentorCertificate_mentorId_fkey` FOREIGN KEY (`mentorId`) REFERENCES `Mentor`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
83
+
84
+ -- AddForeignKey
85
+ ALTER TABLE `LanguageRepoTranslation` ADD CONSTRAINT `LanguageRepoTranslation_langRepoId_fkey` FOREIGN KEY (`langRepoId`) REFERENCES `LanguageRepo`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `is_featured` on the `Mentor` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE `Mentor` DROP COLUMN `is_featured`;
@@ -0,0 +1,18 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `achivementId` on the `MentorAchievement` table. All the data in the column will be lost.
5
+ - You are about to drop the column `uploadId` on the `MentorAchievement` table. All the data in the column will be lost.
6
+ - Added the required column `achievementId` to the `MentorAchievement` table without a default value. This is not possible if the table is not empty.
7
+
8
+ */
9
+ -- DropForeignKey
10
+ ALTER TABLE `MentorAchievement` DROP FOREIGN KEY `MentorAchievement_achivementId_fkey`;
11
+
12
+ -- AlterTable
13
+ ALTER TABLE `MentorAchievement` DROP COLUMN `achivementId`,
14
+ DROP COLUMN `uploadId`,
15
+ ADD COLUMN `achievementId` INTEGER NOT NULL;
16
+
17
+ -- AddForeignKey
18
+ ALTER TABLE `MentorAchievement` ADD CONSTRAINT `MentorAchievement_achievementId_fkey` FOREIGN KEY (`achievementId`) REFERENCES `MentorshipAchievement`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,133 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `categoryId` on the `MnProgram` table. All the data in the column will be lost.
5
+ - You are about to drop the `MnProgramPreparation` table. If the table is not empty, all the data it contains will be lost.
6
+ - You are about to drop the `MnProgramPreparationAttachment` table. If the table is not empty, all the data it contains will be lost.
7
+ - You are about to drop the `MnProgramRequest` table. If the table is not empty, all the data it contains will be lost.
8
+ - You are about to drop the `MnProgramRequestAvailablity` table. If the table is not empty, all the data it contains will be lost.
9
+ - You are about to drop the `MnProgramRequestAvailablitySlot` table. If the table is not empty, all the data it contains will be lost.
10
+ - You are about to drop the `MnProgramRequestLecture` table. If the table is not empty, all the data it contains will be lost.
11
+ - You are about to drop the `MnProgramRequestLectureSession` table. If the table is not empty, all the data it contains will be lost.
12
+ - You are about to drop the `MnProgramRequestLectureSessionAttachment` table. If the table is not empty, all the data it contains will be lost.
13
+
14
+ */
15
+ -- DropForeignKey
16
+ ALTER TABLE `MnProgram` DROP FOREIGN KEY `MnProgram_categoryId_fkey`;
17
+
18
+ -- DropForeignKey
19
+ ALTER TABLE `MnProgramPreparation` DROP FOREIGN KEY `MnProgramPreparation_mnProgramId_fkey`;
20
+
21
+ -- DropForeignKey
22
+ ALTER TABLE `MnProgramPreparationAttachment` DROP FOREIGN KEY `MnProgramPreparationAttachment_attachmentId_fkey`;
23
+
24
+ -- DropForeignKey
25
+ ALTER TABLE `MnProgramPreparationAttachment` DROP FOREIGN KEY `MnProgramPreparationAttachment_mnProgramPreparationId_fkey`;
26
+
27
+ -- DropForeignKey
28
+ ALTER TABLE `MnProgramRequest` DROP FOREIGN KEY `MnProgramRequest_mentorId_fkey`;
29
+
30
+ -- DropForeignKey
31
+ ALTER TABLE `MnProgramRequest` DROP FOREIGN KEY `MnProgramRequest_mnProgramId_fkey`;
32
+
33
+ -- DropForeignKey
34
+ ALTER TABLE `MnProgramRequest` DROP FOREIGN KEY `MnProgramRequest_orderId_fkey`;
35
+
36
+ -- DropForeignKey
37
+ ALTER TABLE `MnProgramRequest` DROP FOREIGN KEY `MnProgramRequest_userId_fkey`;
38
+
39
+ -- DropForeignKey
40
+ ALTER TABLE `MnProgramRequestAvailablity` DROP FOREIGN KEY `MnProgramRequestAvailablity_mnProgramRequestId_fkey`;
41
+
42
+ -- DropForeignKey
43
+ ALTER TABLE `MnProgramRequestAvailablitySlot` DROP FOREIGN KEY `MnProgramRequestAvailablitySlot_mnProgramRequestAvailablity_fkey`;
44
+
45
+ -- DropForeignKey
46
+ ALTER TABLE `MnProgramRequestLecture` DROP FOREIGN KEY `MnProgramRequestLecture_mnProgramRequestId_fkey`;
47
+
48
+ -- DropForeignKey
49
+ ALTER TABLE `MnProgramRequestLectureSession` DROP FOREIGN KEY `MnProgramRequestLectureSession_mnProgramRequestAvailablityS_fkey`;
50
+
51
+ -- DropForeignKey
52
+ ALTER TABLE `MnProgramRequestLectureSession` DROP FOREIGN KEY `MnProgramRequestLectureSession_mnProgramRequestLectureId_fkey`;
53
+
54
+ -- DropForeignKey
55
+ ALTER TABLE `MnProgramRequestLectureSessionAttachment` DROP FOREIGN KEY `MnProgramRequestLectureSessionAttachment_mnProgramRequestLe_fkey`;
56
+
57
+ -- DropForeignKey
58
+ ALTER TABLE `MnProgramRequestLectureSessionAttachment` DROP FOREIGN KEY `MnProgramRequestLectureSessionAttachment_uploadId_fkey`;
59
+
60
+ -- AlterTable
61
+ ALTER TABLE `MnProgram` DROP COLUMN `categoryId`;
62
+
63
+ -- DropTable
64
+ DROP TABLE `MnProgramPreparation`;
65
+
66
+ -- DropTable
67
+ DROP TABLE `MnProgramPreparationAttachment`;
68
+
69
+ -- DropTable
70
+ DROP TABLE `MnProgramRequest`;
71
+
72
+ -- DropTable
73
+ DROP TABLE `MnProgramRequestAvailablity`;
74
+
75
+ -- DropTable
76
+ DROP TABLE `MnProgramRequestAvailablitySlot`;
77
+
78
+ -- DropTable
79
+ DROP TABLE `MnProgramRequestLecture`;
80
+
81
+ -- DropTable
82
+ DROP TABLE `MnProgramRequestLectureSession`;
83
+
84
+ -- DropTable
85
+ DROP TABLE `MnProgramRequestLectureSessionAttachment`;
86
+
87
+ -- CreateTable
88
+ CREATE TABLE `MnProgramCategory` (
89
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
90
+ `categoryId` INTEGER NOT NULL,
91
+ `mnProgramId` INTEGER NOT NULL,
92
+ `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
93
+ `updatedAt` DATETIME(3) NOT NULL,
94
+
95
+ PRIMARY KEY (`id`)
96
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
97
+
98
+ -- CreateTable
99
+ CREATE TABLE `MnProgramReservation` (
100
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
101
+ `isPending` BOOLEAN NOT NULL DEFAULT false,
102
+ `isInProgress` BOOLEAN NOT NULL DEFAULT false,
103
+ `isCompleted` BOOLEAN NOT NULL DEFAULT false,
104
+ `isCanceled` BOOLEAN NOT NULL DEFAULT false,
105
+ `userId` INTEGER NOT NULL,
106
+ `mentorId` INTEGER NULL,
107
+ `mnProgramId` INTEGER NOT NULL,
108
+ `orderId` INTEGER NOT NULL,
109
+ `permalink` VARCHAR(191) NOT NULL,
110
+ `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
111
+ `updatedAt` DATETIME(3) NOT NULL,
112
+
113
+ UNIQUE INDEX `MnProgramReservation_permalink_key`(`permalink`),
114
+ PRIMARY KEY (`id`)
115
+ ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
116
+
117
+ -- AddForeignKey
118
+ ALTER TABLE `MnProgramCategory` ADD CONSTRAINT `MnProgramCategory_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `MnCategory`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
119
+
120
+ -- AddForeignKey
121
+ ALTER TABLE `MnProgramCategory` ADD CONSTRAINT `MnProgramCategory_mnProgramId_fkey` FOREIGN KEY (`mnProgramId`) REFERENCES `MnProgram`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
122
+
123
+ -- AddForeignKey
124
+ ALTER TABLE `MnProgramReservation` ADD CONSTRAINT `MnProgramReservation_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `User`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
125
+
126
+ -- AddForeignKey
127
+ ALTER TABLE `MnProgramReservation` ADD CONSTRAINT `MnProgramReservation_mentorId_fkey` FOREIGN KEY (`mentorId`) REFERENCES `Mentor`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
128
+
129
+ -- AddForeignKey
130
+ ALTER TABLE `MnProgramReservation` ADD CONSTRAINT `MnProgramReservation_mnProgramId_fkey` FOREIGN KEY (`mnProgramId`) REFERENCES `MnProgram`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
131
+
132
+ -- AddForeignKey
133
+ ALTER TABLE `MnProgramReservation` ADD CONSTRAINT `MnProgramReservation_orderId_fkey` FOREIGN KEY (`orderId`) REFERENCES `Order`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,44 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `Service` table. If the table is not empty, all the data it contains will be lost.
5
+ - You are about to drop the `ServiceMentor` table. If the table is not empty, all the data it contains will be lost.
6
+ - You are about to drop the `ServiceRequest` table. If the table is not empty, all the data it contains will be lost.
7
+ - You are about to drop the `ServiceTranlstion` table. If the table is not empty, all the data it contains will be lost.
8
+
9
+ */
10
+ -- DropForeignKey
11
+ ALTER TABLE `Service` DROP FOREIGN KEY `Service_thumbnailId_fkey`;
12
+
13
+ -- DropForeignKey
14
+ ALTER TABLE `ServiceMentor` DROP FOREIGN KEY `ServiceMentor_mentorId_fkey`;
15
+
16
+ -- DropForeignKey
17
+ ALTER TABLE `ServiceMentor` DROP FOREIGN KEY `ServiceMentor_serviceId_fkey`;
18
+
19
+ -- DropForeignKey
20
+ ALTER TABLE `ServiceRequest` DROP FOREIGN KEY `ServiceRequest_mentorId_fkey`;
21
+
22
+ -- DropForeignKey
23
+ ALTER TABLE `ServiceRequest` DROP FOREIGN KEY `ServiceRequest_orderId_fkey`;
24
+
25
+ -- DropForeignKey
26
+ ALTER TABLE `ServiceRequest` DROP FOREIGN KEY `ServiceRequest_serviceId_fkey`;
27
+
28
+ -- DropForeignKey
29
+ ALTER TABLE `ServiceRequest` DROP FOREIGN KEY `ServiceRequest_userId_fkey`;
30
+
31
+ -- DropForeignKey
32
+ ALTER TABLE `ServiceTranlstion` DROP FOREIGN KEY `ServiceTranlstion_serviceId_fkey`;
33
+
34
+ -- DropTable
35
+ DROP TABLE `Service`;
36
+
37
+ -- DropTable
38
+ DROP TABLE `ServiceMentor`;
39
+
40
+ -- DropTable
41
+ DROP TABLE `ServiceRequest`;
42
+
43
+ -- DropTable
44
+ DROP TABLE `ServiceTranlstion`;
@@ -0,0 +1,11 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `categoryId` on the `Mentor` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE `Mentor` DROP FOREIGN KEY `Mentor_categoryId_fkey`;
9
+
10
+ -- AlterTable
11
+ ALTER TABLE `Mentor` DROP COLUMN `categoryId`;
@@ -106,11 +106,9 @@ model User {
106
106
  updatedAt DateTime @updatedAt
107
107
  subscriptions Subscription[]
108
108
  cvs CV[]
109
- cls CL[]
110
- ServiceRequest ServiceRequest[]
109
+ cls CL[]
111
110
  Mentor Mentor[]
112
111
  UserMeta UserMeta[]
113
- MnProgramRequest MnProgramRequest[]
114
112
  Order Order[]
115
113
  UserCoupon UserCoupon[]
116
114
  Referral Referral? @relation(fields: [referralId], references: [id])
@@ -118,6 +116,10 @@ model User {
118
116
  AiCvChat AiCvChat[]
119
117
 
120
118
  UserFavoriteMentor UserFavoriteMentor[]
119
+
120
+ MentorReview MentorReview[]
121
+
122
+ MnProgramReservation MnProgramReservation[]
121
123
  }
122
124
 
123
125
  model UserMeta {
@@ -546,24 +548,24 @@ model Mentor {
546
548
  status Boolean @default(false)
547
549
  isDeleted Boolean @default(false)
548
550
  isBanned Boolean @default(false)
551
+ isFeatured Boolean @default(false)
549
552
  thumbnailId Int
550
553
  userId Int
551
- categoryId Int
552
554
  createdAt DateTime @default(now())
553
555
  updatedAt DateTime @updatedAt
554
556
  user User @relation(fields: [userId], references: [id])
555
557
  thumbnail Upload @relation(fields: [thumbnailId], references: [id])
556
- Category MnCategory @relation(fields: [categoryId], references: [id])
557
- ServiceMentor ServiceMentor[]
558
- ServiceRequest ServiceRequest[]
559
558
  MnProgramMentor MnProgramMentor[]
560
- MnProgramRequest MnProgramRequest[]
561
559
  MentorAvailablity MentorAvailablity[]
562
560
  UserFavoriteMentor UserFavoriteMentor[]
563
561
  MentorAchievement MentorAchievement[]
562
+ MentorReview MentorReview[]
563
+ MentorLanguage MentorLanguage[]
564
+ MentorCertificate MentorCertificate[]
564
565
  // MentorAchivement MentorAchivement[]
565
566
  // MnProgramMeet MnProgramMeet[]
566
567
 
568
+ MnProgramReservation MnProgramReservation[]
567
569
  }
568
570
 
569
571
  model MentorAvailablity {
@@ -575,32 +577,65 @@ model MentorAvailablity {
575
577
  slots MentorAvailablitySlot[]
576
578
  }
577
579
 
578
- model MentorshipAchievement {
579
- id Int @id @default(autoincrement())
580
- name String
581
- points String
582
- thumbnailId Int
583
- thumbnail Upload @relation(fields: [thumbnailId], references: [id])
584
- MentorAchievement MentorAchievement[]
580
+
581
+ model MentorAvailablitySlot {
582
+ id Int @id @default(autoincrement())
583
+ start String?
584
+ end String?
585
+ mentorAvailablityId Int
586
+ MentorAvailablity MentorAvailablity @relation(fields: [mentorAvailablityId], references: [id])
587
+ }
588
+
589
+
590
+ model MentorLanguage {
591
+ id Int @id @default(autoincrement())
592
+ languageId Int
593
+ language LanguageRepo @relation(fields: [languageId], references: [id])
594
+ mentorId Int
595
+ Mentor Mentor @relation(fields: [mentorId], references: [id])
596
+ }
597
+
598
+ model MentorReview {
599
+ id Int @id @default(autoincrement())
600
+ description String
601
+ rating Int
602
+ userId Int
603
+ User User @relation(fields: [userId], references: [id])
604
+ mentorId Int
605
+ Mentor Mentor @relation(fields: [mentorId], references: [id])
606
+
607
+
585
608
  }
586
609
 
587
610
  model MentorAchievement {
588
611
  id Int @id @default(autoincrement())
589
612
  mentorId Int
590
- achivementId Int
591
- Achivement MentorshipAchievement @relation(fields: [achivementId], references: [id])
613
+ achievementId Int
614
+ Achivement MentorshipAchievement @relation(fields: [achievementId], references: [id])
592
615
  Mentor Mentor @relation(fields: [mentorId], references: [id])
593
- uploadId Int?
594
616
  }
595
617
 
596
- model MentorAvailablitySlot {
597
- id Int @id @default(autoincrement())
598
- start String?
599
- end String?
600
- mentorAvailablityId Int
601
- MentorAvailablity MentorAvailablity @relation(fields: [mentorAvailablityId], references: [id])
618
+
619
+ model MentorCertificate {
620
+ id Int @id @default(autoincrement())
621
+ mentorId Int
622
+ name String
623
+ description String?
624
+ link String?
625
+ Mentor Mentor @relation(fields: [mentorId], references: [id])
626
+ }
627
+
628
+
629
+ model MentorshipAchievement {
630
+ id Int @id @default(autoincrement())
631
+ name String
632
+ score String
633
+ thumbnailId Int
634
+ thumbnail Upload @relation(fields: [thumbnailId], references: [id])
635
+ MentorAchievement MentorAchievement[]
602
636
  }
603
637
 
638
+
604
639
  model MnCategory {
605
640
  id Int @id @default(autoincrement())
606
641
  name String
@@ -610,8 +645,7 @@ model MnCategory {
610
645
  permalink String @unique
611
646
  isDeleted Boolean @default(false)
612
647
  translations MnCategoryTranslation[]
613
- Mentor Mentor[]
614
- MnProgram MnProgram[]
648
+ MnProgramCategory MnProgramCategory[]
615
649
  }
616
650
 
617
651
  model MnCategoryTranslation {
@@ -623,59 +657,6 @@ model MnCategoryTranslation {
623
657
  Category MnCategory @relation(fields: [categoryId], references: [id])
624
658
  }
625
659
 
626
- model Service {
627
- id Int @id @default(autoincrement())
628
- name String
629
- description String @db.LongText
630
- fullPrice Int
631
- commission Int
632
- status Boolean @default(false)
633
- thumbnailId Int
634
- permalink String @unique
635
- isDeleted Boolean @default(false)
636
- Thumbnail Upload @relation(fields: [thumbnailId], references: [id])
637
- translations ServiceTranlstion[]
638
- ServiceMentor ServiceMentor[]
639
- ServiceRequest ServiceRequest[]
640
- }
641
-
642
- model ServiceTranlstion {
643
- id Int @id @default(autoincrement())
644
- key String
645
- value String
646
- lang String
647
- serviceId Int
648
- Service Service @relation(fields: [serviceId], references: [id])
649
- }
650
-
651
- model ServiceMentor {
652
- id Int @id @default(autoincrement())
653
- mentorId Int
654
- serviceId Int
655
- Mentor Mentor @relation(fields: [mentorId], references: [id])
656
- Service Service @relation(fields: [serviceId], references: [id])
657
- createdAt DateTime @default(now())
658
- updatedAt DateTime @updatedAt
659
- }
660
-
661
- model ServiceRequest {
662
- id Int @id @default(autoincrement())
663
- isPending Boolean @default(true)
664
- isInProgress Boolean @default(false)
665
- isCompleted Boolean @default(false)
666
- isCanceled Boolean @default(false)
667
- userId Int
668
- mentorId Int?
669
- serviceId Int
670
- orderId Int
671
- permalink String @unique
672
- Service Service @relation(fields: [serviceId], references: [id])
673
- Order Order @relation(fields: [orderId], references: [id])
674
- User User @relation(fields: [userId], references: [id])
675
- mentor Mentor? @relation(fields: [mentorId], references: [id])
676
- createdAt DateTime @default(now())
677
- updatedAt DateTime @updatedAt
678
- }
679
660
 
680
661
  model MnProgram {
681
662
  id Int @id @default(autoincrement())
@@ -683,7 +664,6 @@ model MnProgram {
683
664
  description String @db.LongText
684
665
  status Boolean @default(false)
685
666
  type MnProgramType
686
- categoryId Int
687
667
  folder String
688
668
  meetCount Int
689
669
  thumbnailId Int
@@ -692,13 +672,12 @@ model MnProgram {
692
672
  isDeleted Boolean @default(false)
693
673
  permalink String @unique
694
674
  createdAt DateTime @default(now())
695
- updatedAt DateTime @updatedAt
696
- Category MnCategory @relation(fields: [categoryId], references: [id])
675
+ updatedAt DateTime @updatedAt
697
676
  Thumbnail Upload @relation(fields: [thumbnailId], references: [id])
698
677
  MnProgramMentor MnProgramMentor[]
699
- MnProgramRequest MnProgramRequest[]
700
- MnProgramPreparation MnProgramPreparation[]
678
+ MnProgramCategory MnProgramCategory[]
701
679
  translations MnProgramTranslation[]
680
+ MnProgramReservation MnProgramReservation[]
702
681
  }
703
682
 
704
683
  model MnProgramMentor {
@@ -711,6 +690,21 @@ model MnProgramMentor {
711
690
  mnProgramId Int
712
691
  }
713
692
 
693
+
694
+
695
+ model MnProgramCategory {
696
+ id Int @id @default(autoincrement())
697
+ categoryId Int
698
+ mnProgramId Int
699
+ Category MnCategory @relation(fields: [categoryId], references: [id])
700
+ MnProgram MnProgram @relation(fields: [mnProgramId], references: [id])
701
+ createdAt DateTime @default(now())
702
+ updatedAt DateTime @updatedAt
703
+ }
704
+
705
+
706
+
707
+
714
708
  model MnProgramTranslation {
715
709
  id Int @id @default(autoincrement())
716
710
  key String
@@ -720,26 +714,8 @@ model MnProgramTranslation {
720
714
  mnProgramId Int
721
715
  }
722
716
 
723
- model MnProgramPreparation {
724
- id Int @id @default(autoincrement())
725
- name String
726
- mnProgramMeetId Int
727
- folder String
728
- mnProgramId Int
729
- MnProgram MnProgram @relation(fields: [mnProgramId], references: [id])
730
- MnProgramPreparationAttachment MnProgramPreparationAttachment[]
731
- }
732
-
733
- model MnProgramPreparationAttachment {
734
- id Int @id @default(autoincrement())
735
- name String
736
- mnProgramPreparationId Int
737
- attachmentId Int
738
- PreparationAttachment Upload @relation(fields: [attachmentId], references: [id])
739
- MnProgramPreparation MnProgramPreparation @relation(fields: [mnProgramPreparationId], references: [id])
740
- }
741
717
 
742
- model MnProgramRequest {
718
+ model MnProgramReservation {
743
719
  id Int @id @default(autoincrement())
744
720
  isPending Boolean @default(false)
745
721
  isInProgress Boolean @default(false)
@@ -756,55 +732,7 @@ model MnProgramRequest {
756
732
  Mentor Mentor? @relation(fields: [mentorId], references: [id])
757
733
  MnProgram MnProgram @relation(fields: [mnProgramId], references: [id])
758
734
  Order Order @relation(fields: [orderId], references: [id])
759
- MnProgramRequestAvailablity MnProgramRequestAvailablity[]
760
- MnProgramRequestLecture MnProgramRequestLecture[]
761
- }
762
-
763
- model MnProgramRequestAvailablity {
764
- id Int @id @default(autoincrement())
765
- day String
766
- mnProgramRequestId Int
767
- slots MnProgramRequestAvailablitySlot[]
768
- MnProgramRequest MnProgramRequest @relation(fields: [mnProgramRequestId], references: [id])
769
- }
770
-
771
- model MnProgramRequestAvailablitySlot {
772
- id Int @id @default(autoincrement())
773
- start String
774
- end String
775
- mnProgramRequestAvailablityId Int
776
- MnProgramRequestAvailablity MnProgramRequestAvailablity @relation(fields: [mnProgramRequestAvailablityId], references: [id])
777
- MnProgramRequestLectureSession MnProgramRequestLectureSession[]
778
- }
779
-
780
- model MnProgramRequestLecture {
781
- id Int @id @default(autoincrement())
782
- status MnProgramRequestLectureStatus @default(PENDING)
783
- at DateTime?
784
- mnProgramRequestId Int
785
- mnProgramRequest MnProgramRequest @relation(fields: [mnProgramRequestId], references: [id])
786
- MnProgramRequestLectureSession MnProgramRequestLectureSession[]
787
- }
788
735
 
789
- model MnProgramRequestLectureSession {
790
- id Int @id @default(autoincrement())
791
- permalink String @unique
792
- mnProgramRequestAvailablitySlotId Int
793
- mnProgramRequestLectureId Int
794
- createdAt DateTime @default(now())
795
- updatedAt DateTime @updatedAt
796
- MnProgramRequestAvailablitySlot MnProgramRequestAvailablitySlot @relation(fields: [mnProgramRequestAvailablitySlotId], references: [id])
797
- MnProgramRequestLecture MnProgramRequestLecture @relation(fields: [mnProgramRequestLectureId], references: [id])
798
- MnProgramRequestLectureSessionAttachment MnProgramRequestLectureSessionAttachment[]
799
- }
800
-
801
- model MnProgramRequestLectureSessionAttachment {
802
- id Int @id @default(autoincrement())
803
- uploadId Int
804
- mnProgramRequestLectureSessionId Int
805
- by String
806
- MnProgramRequestLectureSession MnProgramRequestLectureSession @relation(fields: [mnProgramRequestLectureSessionId], references: [id])
807
- Upload Upload @relation(fields: [uploadId], references: [id])
808
736
  }
809
737
 
810
738
  model Upload {
@@ -816,14 +744,11 @@ model Upload {
816
744
  modelId Int
817
745
  model String
818
746
  Mentor Mentor[]
819
- Template Template[]
820
- Service Service[]
747
+ Template Template[]
821
748
  createdAt DateTime @default(now())
822
749
  updatedAt DateTime @updatedAt
823
750
  FontRepo FontRepo[]
824
- MnProgram MnProgram[]
825
- MnProgramPreparationAttachment MnProgramPreparationAttachment[]
826
- MnProgramRequestLectureSessionAttachment MnProgramRequestLectureSessionAttachment[]
751
+ MnProgram MnProgram[]
827
752
  MentorshipAchievement MentorshipAchievement[]
828
753
  }
829
754
 
@@ -838,10 +763,10 @@ model Order {
838
763
  paymentId Int @unique
839
764
  Payment Payment @relation(fields: [paymentId], references: [id])
840
765
  User User @relation(fields: [userId], references: [id])
841
- ServiceRequest ServiceRequest[]
842
766
  createdAt DateTime @default(now())
843
767
  updatedAt DateTime @updatedAt
844
- MnProgramRequest MnProgramRequest[]
768
+
769
+ MnProgramReservation MnProgramReservation[]
845
770
  }
846
771
 
847
772
  model Payment {
@@ -971,6 +896,29 @@ model SkillRepoTranslation {
971
896
  SkillRepo SkillRepo @relation(fields: [skillRepoId], references: [id])
972
897
  }
973
898
 
899
+
900
+ model LanguageRepo {
901
+ id Int @id @default(autoincrement())
902
+ name String
903
+ status Boolean @default(false)
904
+ translations LanguageRepoTranslation[]
905
+ isDeleted Boolean @default(false)
906
+
907
+
908
+ MentorLanguage MentorLanguage[]
909
+ }
910
+
911
+ model LanguageRepoTranslation {
912
+ id Int @id @default(autoincrement())
913
+ key String
914
+ value String
915
+ lang String
916
+ langRepoId Int
917
+ SkillRepo LanguageRepo @relation(fields: [langRepoId], references: [id])
918
+
919
+ }
920
+
921
+
974
922
  model ApprovalRequest {
975
923
  id Int @id @default(autoincrement())
976
924
  model ApprovalRequestModel
@@ -978,3 +926,127 @@ model ApprovalRequest {
978
926
  stautus ApprovalRequestState @default(PENDING)
979
927
  changes String @db.LongText
980
928
  }
929
+
930
+
931
+
932
+ // model Service {
933
+ // id Int @id @default(autoincrement())
934
+ // name String
935
+ // description String @db.LongText
936
+ // fullPrice Int
937
+ // commission Int
938
+ // status Boolean @default(false)
939
+ // thumbnailId Int
940
+ // permalink String @unique
941
+ // isDeleted Boolean @default(false)
942
+ // Thumbnail Upload @relation(fields: [thumbnailId], references: [id])
943
+ // translations ServiceTranlstion[]
944
+ // ServiceMentor ServiceMentor[]
945
+ // ServiceRequest ServiceRequest[]
946
+ // }
947
+
948
+ // model ServiceTranlstion {
949
+ // id Int @id @default(autoincrement())
950
+ // key String
951
+ // value String
952
+ // lang String
953
+ // serviceId Int
954
+ // Service Service @relation(fields: [serviceId], references: [id])
955
+ // }
956
+
957
+ // model ServiceMentor {
958
+ // id Int @id @default(autoincrement())
959
+ // mentorId Int
960
+ // serviceId Int
961
+ // Mentor Mentor @relation(fields: [mentorId], references: [id])
962
+ // Service Service @relation(fields: [serviceId], references: [id])
963
+ // createdAt DateTime @default(now())
964
+ // updatedAt DateTime @updatedAt
965
+ // }
966
+
967
+ // model ServiceRequest {
968
+ // id Int @id @default(autoincrement())
969
+ // isPending Boolean @default(true)
970
+ // isInProgress Boolean @default(false)
971
+ // isCompleted Boolean @default(false)
972
+ // isCanceled Boolean @default(false)
973
+ // userId Int
974
+ // mentorId Int?
975
+ // serviceId Int
976
+ // orderId Int
977
+ // permalink String @unique
978
+ // Service Service @relation(fields: [serviceId], references: [id])
979
+ // Order Order @relation(fields: [orderId], references: [id])
980
+ // User User @relation(fields: [userId], references: [id])
981
+ // mentor Mentor? @relation(fields: [mentorId], references: [id])
982
+ // createdAt DateTime @default(now())
983
+ // updatedAt DateTime @updatedAt
984
+ // }
985
+
986
+
987
+ // model MnProgramPreparation {
988
+ // id Int @id @default(autoincrement())
989
+ // name String
990
+ // mnProgramMeetId Int
991
+ // folder String
992
+ // mnProgramId Int
993
+ // MnProgram MnProgram @relation(fields: [mnProgramId], references: [id])
994
+ // MnProgramPreparationAttachment MnProgramPreparationAttachment[]
995
+ // }
996
+
997
+ // model MnProgramPreparationAttachment {
998
+ // id Int @id @default(autoincrement())
999
+ // name String
1000
+ // mnProgramPreparationId Int
1001
+ // attachmentId Int
1002
+ // PreparationAttachment Upload @relation(fields: [attachmentId], references: [id])
1003
+ // MnProgramPreparation MnProgramPreparation @relation(fields: [mnProgramPreparationId], references: [id])
1004
+ // }
1005
+
1006
+
1007
+ // model MnProgramRequestAvailablity {
1008
+ // id Int @id @default(autoincrement())
1009
+ // day String
1010
+ // mnProgramRequestId Int
1011
+ // slots MnProgramRequestAvailablitySlot[]
1012
+ // MnProgramRequest MnProgramRequest @relation(fields: [mnProgramRequestId], references: [id])
1013
+ // }
1014
+
1015
+ // model MnProgramRequestAvailablitySlot {
1016
+ // id Int @id @default(autoincrement())
1017
+ // start String
1018
+ // end String
1019
+ // mnProgramRequestAvailablityId Int
1020
+ // MnProgramRequestAvailablity MnProgramRequestAvailablity @relation(fields: [mnProgramRequestAvailablityId], references: [id])
1021
+ // MnProgramRequestLectureSession MnProgramRequestLectureSession[]
1022
+ // }
1023
+
1024
+ // model MnProgramRequestLecture {
1025
+ // id Int @id @default(autoincrement())
1026
+ // status MnProgramRequestLectureStatus @default(PENDING)
1027
+ // at DateTime?
1028
+ // mnProgramRequestId Int
1029
+ // mnProgramRequest MnProgramRequest @relation(fields: [mnProgramRequestId], references: [id])
1030
+ // MnProgramRequestLectureSession MnProgramRequestLectureSession[]
1031
+ // }
1032
+
1033
+ // model MnProgramRequestLectureSession {
1034
+ // id Int @id @default(autoincrement())
1035
+ // permalink String @unique
1036
+ // mnProgramRequestAvailablitySlotId Int
1037
+ // mnProgramRequestLectureId Int
1038
+ // createdAt DateTime @default(now())
1039
+ // updatedAt DateTime @updatedAt
1040
+ // MnProgramRequestAvailablitySlot MnProgramRequestAvailablitySlot @relation(fields: [mnProgramRequestAvailablitySlotId], references: [id])
1041
+ // MnProgramRequestLecture MnProgramRequestLecture @relation(fields: [mnProgramRequestLectureId], references: [id])
1042
+ // MnProgramRequestLectureSessionAttachment MnProgramRequestLectureSessionAttachment[]
1043
+ // }
1044
+
1045
+ // model MnProgramRequestLectureSessionAttachment {
1046
+ // id Int @id @default(autoincrement())
1047
+ // uploadId Int
1048
+ // mnProgramRequestLectureSessionId Int
1049
+ // by String
1050
+ // MnProgramRequestLectureSession MnProgramRequestLectureSession @relation(fields: [mnProgramRequestLectureSessionId], references: [id])
1051
+ // Upload Upload @relation(fields: [uploadId], references: [id])
1052
+ // }