@@ -52,6 +52,10 @@ enum ProgramType {
5252enum BacklogItemStatus {
5353 DRAFT
5454 PUBLISHED
55+ IN_PAIRING
56+ ASSIGNED
57+ IN_REALIZATION
58+ CLOSED
5559 ARCHIVED
5660}
5761
@@ -186,6 +190,24 @@ enum ProgramBPoDecision {
186190 CHANGES_REQUESTED
187191}
188192
193+ enum ProgramBBacklogDocumentCategory {
194+ TECHNICAL_SPECIFICATION
195+ SUPPORTING
196+ OTHER
197+ }
198+
199+ enum ProgramBProjectDocumentCategory {
200+ OUTPUT
201+ FINAL_PRESENTATION
202+ DELIVERABLE
203+ OTHER
204+ }
205+
206+ enum ProgramBDocumentVisibility {
207+ INTERNAL
208+ PARTICIPANTS
209+ }
210+
189211model User {
190212 id String @id @default (uuid () )
191213 firstName String
@@ -220,19 +242,21 @@ model User {
220242 uploads UploadedFile []
221243 organizationDocumentsUploaded OrganizationDocument [] @relation (" OrganizationDocumentUploadedBy " )
222244
223- applicationsCreated Application [] @relation (" ApplicationCreatedBy " )
224- assignedProgramAApplications Application [] @relation (" ApplicationAssignedMentor " )
225- applicationEvaluations ApplicationEvaluation [] @relation (" ApplicationEvaluationEvaluator " )
226- applicationDecisions Application [] @relation (" ApplicationDecisionBy " )
227- programAMentorAssignmentsMade Application [] @relation (" ApplicationMentorAssignedBy " )
228- updatedApplicationSections ApplicationSection [] @relation (" ApplicationSectionUpdatedBy " )
229- applicationSectionHistories ApplicationSectionHistory [] @relation (" SectionHistorySavedBy " )
230- applicationDocumentsCreated ApplicationDocument [] @relation (" ApplicationDocumentCreatedBy " )
231- applicationDocumentsForMember ApplicationDocument [] @relation (" ApplicationDocumentMember " )
232- productOwnerForBacklogItems BacklogItem [] @relation (" BacklogItemProductOwner " )
233- productOwnerForProgramBProjects ProgramBProject [] @relation (" ProgramBProjectProductOwner " )
234- programBMentoringNotesAuthored ProgramBMentoringNote [] @relation (" ProgramBMentoringNoteAuthor " )
235- programBPoReviewsAuthored ProgramBPoReview [] @relation (" ProgramBPoReviewAuthor " )
245+ applicationsCreated Application [] @relation (" ApplicationCreatedBy " )
246+ assignedProgramAApplications Application [] @relation (" ApplicationAssignedMentor " )
247+ applicationEvaluations ApplicationEvaluation [] @relation (" ApplicationEvaluationEvaluator " )
248+ applicationDecisions Application [] @relation (" ApplicationDecisionBy " )
249+ programAMentorAssignmentsMade Application [] @relation (" ApplicationMentorAssignedBy " )
250+ updatedApplicationSections ApplicationSection [] @relation (" ApplicationSectionUpdatedBy " )
251+ applicationSectionHistories ApplicationSectionHistory [] @relation (" SectionHistorySavedBy " )
252+ applicationDocumentsCreated ApplicationDocument [] @relation (" ApplicationDocumentCreatedBy " )
253+ applicationDocumentsForMember ApplicationDocument [] @relation (" ApplicationDocumentMember " )
254+ productOwnerForBacklogItems BacklogItem [] @relation (" BacklogItemProductOwner " )
255+ productOwnerForProgramBProjects ProgramBProject [] @relation (" ProgramBProjectProductOwner " )
256+ assignedProgramBProjectsAsMentor ProgramBProject [] @relation (" ProgramBProjectMentor " )
257+ programBMentorAssignmentsMade ProgramBProject [] @relation (" ProgramBProjectMentorAssignedBy " )
258+ programBMentoringNotesAuthored ProgramBMentoringNote [] @relation (" ProgramBMentoringNoteAuthor " )
259+ programBPoReviewsAuthored ProgramBPoReview [] @relation (" ProgramBPoReviewAuthor " )
236260
237261 needsInfoItemsCreated NeedsInfoItem [] @relation (" NeedsInfoCreatedBy " )
238262 needsInfoItemsResolved NeedsInfoItem [] @relation (" NeedsInfoResolvedBy " )
@@ -244,6 +268,8 @@ model User {
244268 updatedAt DateTime @updatedAt
245269 programBTeamApplications ProgramBTeamApplication []
246270 programBTeamApplicationCvs ProgramBTeamApplicationCv []
271+ programBBacklogDocuments ProgramBBacklogDocument []
272+ programBProjectDocuments ProgramBProjectDocument []
247273
248274 @@index ([organizationId ] )
249275 @@index ([role , status ] )
@@ -278,6 +304,8 @@ model UploadedFile {
278304 cvFor StudentProfile [] @relation (" StudentCvFile " )
279305 applicationDocuments ApplicationDocument []
280306 programBTeamApplications ProgramBTeamApplication []
307+ programBBacklogDocuments ProgramBBacklogDocument []
308+ programBProjectDocuments ProgramBProjectDocument []
281309 programBTeamApplicationCvs ProgramBTeamApplicationCv []
282310
283311 @@index ([ownerId , status ] )
@@ -533,6 +561,7 @@ model BacklogItem {
533561 createdAt DateTime @default (now () )
534562 updatedAt DateTime @updatedAt
535563 programBTeamApplications ProgramBTeamApplication []
564+ documents ProgramBBacklogDocument []
536565
537566 @@index ([organizationId ] )
538567 @@index ([status ] )
@@ -710,6 +739,13 @@ model ProgramBProject {
710739 productOwnerUserId String
711740 productOwnerUser User @relation (" ProgramBProjectProductOwner " , fields : [productOwnerUserId ] , references : [id ] , onDelete : Restrict )
712741
742+ mentorUserId String ?
743+ mentorUser User ? @relation (" ProgramBProjectMentor " , fields : [mentorUserId ] , references : [id ] , onDelete : SetNull )
744+
745+ mentorAssignedAt DateTime ?
746+ mentorAssignedById String ?
747+ mentorAssignedBy User ? @relation (" ProgramBProjectMentorAssignedBy " , fields : [mentorAssignedById ] , references : [id ] , onDelete : SetNull )
748+
713749 status ProgramBProjectStatus @default (ACTIVE )
714750
715751 acceptedByCompanyAt DateTime ?
@@ -721,12 +757,15 @@ model ProgramBProject {
721757 milestones ProgramBMilestone []
722758 mentoringNotes ProgramBMentoringNote []
723759 poReviews ProgramBPoReview []
760+ documents ProgramBProjectDocument []
724761
725762 @@index ([teamId ] )
726763 @@index ([backlogItemId ] )
727764 @@index ([applicationId ] )
728765 @@index ([teamApplicationId ] )
729766 @@index ([productOwnerUserId ] )
767+ @@index ([mentorUserId ] )
768+ @@index ([mentorAssignedById ] )
730769 @@index ([status ] )
731770}
732771
@@ -748,6 +787,54 @@ model ProgramBMilestone {
748787 @@index ([projectId , status ] )
749788}
750789
790+ model ProgramBBacklogDocument {
791+ id String @id @default (uuid () )
792+
793+ backlogItemId String
794+ backlogItem BacklogItem @relation (fields : [backlogItemId ] , references : [id ] , onDelete : Cascade )
795+
796+ uploadedFileId String
797+ uploadedFile UploadedFile @relation (fields : [uploadedFileId ] , references : [id ] , onDelete : Cascade )
798+
799+ category ProgramBBacklogDocumentCategory
800+ visibility ProgramBDocumentVisibility @default (PARTICIPANTS )
801+ version Int @default (1 )
802+ isActive Boolean @default (true )
803+
804+ createdById String
805+ createdBy User @relation (fields : [createdById ] , references : [id ] , onDelete : Restrict )
806+
807+ createdAt DateTime @default (now () )
808+ updatedAt DateTime @updatedAt
809+
810+ @@index ([backlogItemId , category , isActive ] )
811+ @@index ([uploadedFileId ] )
812+ }
813+
814+ model ProgramBProjectDocument {
815+ id String @id @default (uuid () )
816+
817+ projectId String
818+ project ProgramBProject @relation (fields : [projectId ] , references : [id ] , onDelete : Cascade )
819+
820+ uploadedFileId String
821+ uploadedFile UploadedFile @relation (fields : [uploadedFileId ] , references : [id ] , onDelete : Cascade )
822+
823+ category ProgramBProjectDocumentCategory
824+ visibility ProgramBDocumentVisibility @default (PARTICIPANTS )
825+ version Int @default (1 )
826+ isActive Boolean @default (true )
827+
828+ createdById String
829+ createdBy User @relation (fields : [createdById ] , references : [id ] , onDelete : Restrict )
830+
831+ createdAt DateTime @default (now () )
832+ updatedAt DateTime @updatedAt
833+
834+ @@index ([projectId , category , isActive ] )
835+ @@index ([uploadedFileId ] )
836+ }
837+
751838model ProgramBMentoringNote {
752839 id String @id @default (uuid () )
753840
0 commit comments