@@ -29,6 +29,7 @@ import { WithMongoID, jsonFormatting } from '../utils/database';
2929
3030import { Schema } from 'mongoose' ;
3131import { genId } from '../utils/random' ;
32+ import { Mentors } from '../models/Mentors' ;
3233
3334const TraineePersonalInfoSchema = new Schema < TraineePersonalInfo > (
3435 {
@@ -64,6 +65,15 @@ const TraineeContactInfoSchema = new Schema<TraineeContactInfo>(
6465 { _id : false }
6566) ;
6667
68+ const MentorsSchema = new Schema < Mentors > (
69+ {
70+ technical : { type : String , required : false , default : null } ,
71+ hr : { type : String , required : false , default : null } ,
72+ english : { type : String , required : false , default : null } ,
73+ } ,
74+ { minimize : false }
75+ ) ;
76+
6777const StrikeSchema = new Schema < StrikeWithReporterID & WithMongoID > ( {
6878 _id : { type : String , default : genId } ,
6979 date : { type : Date , required : true } ,
@@ -109,6 +119,13 @@ const TraineeEducationInfoSchema = new Schema<TraineeEducationInfo>(
109119 enum : Object . values ( LearningStatus ) ,
110120 default : LearningStatus . Studying ,
111121 } ,
122+ mentors : {
123+ type : MentorsSchema ,
124+ required : false ,
125+ default : { } ,
126+ id : false ,
127+ _id : false
128+ } ,
112129 startDate : { type : Date , required : false , default : null } ,
113130 graduationDate : { type : Date , required : false , default : null } ,
114131 quitReason : { type : String , required : false , enum : Object . values ( QuitReason ) , default : null } ,
0 commit comments