@taiger-common/model 1.0.42 → 1.0.43

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 (94) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +23 -23
  3. package/dist/cjs/constants/index.js +7 -7
  4. package/dist/cjs/index.js +17 -17
  5. package/dist/cjs/model/Allcourse.js +10 -10
  6. package/dist/cjs/model/Application.js +78 -77
  7. package/dist/cjs/model/Audit.js +22 -22
  8. package/dist/cjs/model/Basedocumentationslink.js +10 -10
  9. package/dist/cjs/model/Communication.js +30 -30
  10. package/dist/cjs/model/Complaint.js +70 -70
  11. package/dist/cjs/model/Course.js +24 -24
  12. package/dist/cjs/model/Docspage.js +14 -14
  13. package/dist/cjs/model/Documentation.js +14 -14
  14. package/dist/cjs/model/Documentthread.js +50 -50
  15. package/dist/cjs/model/Event.js +59 -59
  16. package/dist/cjs/model/Internaldoc.js +14 -14
  17. package/dist/cjs/model/Interval.js +39 -39
  18. package/dist/cjs/model/Interview.js +36 -36
  19. package/dist/cjs/model/InterviewSurveyResponse.js +24 -24
  20. package/dist/cjs/model/Keywordset.js +48 -48
  21. package/dist/cjs/model/Note.js +9 -9
  22. package/dist/cjs/model/Permission.js +56 -56
  23. package/dist/cjs/model/Program.js +256 -260
  24. package/dist/cjs/model/Programrequirement.js +122 -122
  25. package/dist/cjs/model/ResponseTime.js +27 -27
  26. package/dist/cjs/model/SurveyInput.js +56 -56
  27. package/dist/cjs/model/Template.js +19 -19
  28. package/dist/cjs/model/Tenant.js +9 -9
  29. package/dist/cjs/model/Ticket.js +55 -55
  30. package/dist/cjs/model/Token.js +20 -20
  31. package/dist/cjs/model/User.js +604 -604
  32. package/dist/cjs/model/index.js +44 -44
  33. package/dist/esm/constants/index.js +4 -4
  34. package/dist/esm/index.js +1 -1
  35. package/dist/esm/model/Allcourse.js +7 -7
  36. package/dist/esm/model/Application.js +75 -74
  37. package/dist/esm/model/Audit.js +19 -19
  38. package/dist/esm/model/Basedocumentationslink.js +7 -7
  39. package/dist/esm/model/Communication.js +27 -27
  40. package/dist/esm/model/Complaint.js +67 -67
  41. package/dist/esm/model/Course.js +21 -21
  42. package/dist/esm/model/Docspage.js +11 -11
  43. package/dist/esm/model/Documentation.js +11 -11
  44. package/dist/esm/model/Documentthread.js +47 -47
  45. package/dist/esm/model/Event.js +56 -56
  46. package/dist/esm/model/Internaldoc.js +11 -11
  47. package/dist/esm/model/Interval.js +36 -36
  48. package/dist/esm/model/Interview.js +33 -33
  49. package/dist/esm/model/InterviewSurveyResponse.js +21 -21
  50. package/dist/esm/model/Keywordset.js +45 -45
  51. package/dist/esm/model/Note.js +6 -6
  52. package/dist/esm/model/Permission.js +53 -53
  53. package/dist/esm/model/Program.js +253 -257
  54. package/dist/esm/model/Programrequirement.js +119 -119
  55. package/dist/esm/model/ResponseTime.js +24 -24
  56. package/dist/esm/model/SurveyInput.js +53 -53
  57. package/dist/esm/model/Template.js +16 -16
  58. package/dist/esm/model/Tenant.js +6 -6
  59. package/dist/esm/model/Ticket.js +52 -52
  60. package/dist/esm/model/Token.js +17 -17
  61. package/dist/esm/model/User.js +599 -599
  62. package/dist/esm/model/index.js +28 -28
  63. package/dist/types/constants/index.d.ts +4 -4
  64. package/dist/types/index.d.ts +1 -1
  65. package/dist/types/model/Allcourse.d.ts +63 -63
  66. package/dist/types/model/Application.d.ts +190 -187
  67. package/dist/types/model/Audit.d.ts +75 -75
  68. package/dist/types/model/Basedocumentationslink.d.ts +46 -46
  69. package/dist/types/model/Communication.d.ts +102 -102
  70. package/dist/types/model/Complaint.d.ts +201 -201
  71. package/dist/types/model/Course.d.ts +79 -79
  72. package/dist/types/model/Docspage.d.ts +68 -68
  73. package/dist/types/model/Documentation.d.ts +58 -58
  74. package/dist/types/model/Documentthread.d.ts +211 -211
  75. package/dist/types/model/Event.d.ts +87 -87
  76. package/dist/types/model/Internaldoc.d.ts +58 -58
  77. package/dist/types/model/Interval.d.ts +58 -58
  78. package/dist/types/model/Interview.d.ts +81 -81
  79. package/dist/types/model/InterviewSurveyResponse.d.ts +93 -93
  80. package/dist/types/model/Keywordset.d.ts +75 -75
  81. package/dist/types/model/Note.d.ts +43 -43
  82. package/dist/types/model/Permission.d.ts +87 -87
  83. package/dist/types/model/Program.d.ts +519 -526
  84. package/dist/types/model/Programrequirement.d.ts +171 -171
  85. package/dist/types/model/ResponseTime.d.ts +49 -49
  86. package/dist/types/model/SurveyInput.d.ts +121 -121
  87. package/dist/types/model/Template.d.ts +46 -46
  88. package/dist/types/model/Tenant.d.ts +43 -43
  89. package/dist/types/model/Ticket.d.ts +69 -69
  90. package/dist/types/model/Token.d.ts +43 -43
  91. package/dist/types/model/User.d.ts +1 -1
  92. package/dist/types/model/index.d.ts +28 -28
  93. package/dist/umd/index.js +1 -1
  94. package/package.json +1 -1
@@ -1,599 +1,599 @@
1
- import { Schema } from 'mongoose';
2
- import isEmail from 'validator/lib/isEmail';
3
- import { DocumentStatusType } from '@taiger-common/core';
4
- import { PROGRAM_SUBJECT_KEYS } from './Program';
5
- var ManagerType = {
6
- Agent: 'Agent',
7
- Editor: 'Editor',
8
- AgentAndEditor: 'AgentAndEditor',
9
- None: 'None'
10
- };
11
- var options = { discriminatorKey: 'role', timestamps: true };
12
- var attributeSchema = new Schema({
13
- value: {
14
- type: Number,
15
- required: true
16
- },
17
- name: {
18
- type: String,
19
- required: true
20
- }
21
- });
22
- var userSchema = new Schema({
23
- firstname: {
24
- type: String,
25
- trim: true
26
- },
27
- firstname_chinese: {
28
- type: String,
29
- trim: true
30
- },
31
- lastname: {
32
- type: String,
33
- trim: true
34
- },
35
- lastname_chinese: {
36
- type: String,
37
- trim: true
38
- },
39
- email: {
40
- type: String,
41
- unique: true,
42
- lowercase: true,
43
- validate: [isEmail, 'Invalid email address']
44
- },
45
- pictureUrl: {
46
- type: String
47
- },
48
- password: {
49
- type: String,
50
- select: false,
51
- trim: true,
52
- minlength: [8, 'Password must contain at least 8 characters']
53
- },
54
- archiv: { type: Boolean, default: false },
55
- birthday: {
56
- type: String,
57
- default: ''
58
- },
59
- linkedIn: String,
60
- lineId: String,
61
- isAccountActivated: {
62
- type: Boolean,
63
- default: false
64
- },
65
- notification: {
66
- isRead_survey_not_complete: {
67
- type: Boolean,
68
- default: false
69
- },
70
- isRead_uni_assist_task_assigned: {
71
- type: Boolean,
72
- default: false
73
- },
74
- isRead_new_agent_assigned: {
75
- type: Boolean,
76
- default: true
77
- },
78
- isRead_new_editor_assigned: {
79
- type: Boolean,
80
- default: true
81
- },
82
- isRead_new_cvmlrl_tasks_created: {
83
- type: Boolean,
84
- default: true
85
- },
86
- isRead_new_cvmlrl_messsage: {
87
- type: Boolean,
88
- default: true
89
- },
90
- isRead_base_documents_missing: {
91
- type: Boolean,
92
- default: false
93
- },
94
- isRead_base_documents_rejected: {
95
- type: Boolean,
96
- default: true
97
- },
98
- isRead_new_programs_assigned: {
99
- type: Boolean,
100
- default: false
101
- }
102
- },
103
- taigerai: {
104
- input: {
105
- name: {
106
- type: String,
107
- default: ''
108
- },
109
- status: {
110
- type: String,
111
- enum: Object.values(DocumentStatusType),
112
- default: DocumentStatusType.Missing
113
- },
114
- file_category: {
115
- type: String,
116
- default: 'Others'
117
- },
118
- path: {
119
- type: String,
120
- default: ''
121
- },
122
- // TODO: updateBy
123
- updatedAt: Date
124
- },
125
- output: {
126
- name: {
127
- type: String,
128
- default: ''
129
- },
130
- status: {
131
- type: String,
132
- enum: Object.values(DocumentStatusType),
133
- default: DocumentStatusType.Missing
134
- },
135
- file_category: {
136
- type: String,
137
- default: 'Others'
138
- },
139
- path: {
140
- type: String,
141
- default: ''
142
- },
143
- // TODO: updateBy
144
- updatedAt: Date
145
- },
146
- feedback: {
147
- message: {
148
- type: String,
149
- default: ''
150
- },
151
- // TODO: updateBy
152
- updatedAt: Date
153
- }
154
- },
155
- application_preference: {
156
- expected_application_date: {
157
- type: String,
158
- default: ''
159
- },
160
- expected_application_semester: {
161
- type: String,
162
- default: ''
163
- },
164
- target_program_language: {
165
- type: String,
166
- default: ''
167
- },
168
- // To be deprecated -> read only in frontend
169
- target_application_field: {
170
- type: String,
171
- default: ''
172
- },
173
- targetApplicationSubjects: [
174
- {
175
- type: String,
176
- enum: PROGRAM_SUBJECT_KEYS
177
- }
178
- ],
179
- target_degree: {
180
- type: String,
181
- default: ''
182
- },
183
- considered_privat_universities: {
184
- type: String,
185
- default: '-'
186
- },
187
- special_wished: {
188
- type: String,
189
- default: ''
190
- },
191
- application_outside_germany: {
192
- type: String,
193
- default: '-'
194
- },
195
- updatedAt: Date
196
- },
197
- academic_background: {
198
- university: {
199
- high_school_isGraduated: {
200
- type: String,
201
- default: ''
202
- },
203
- attended_high_school: {
204
- type: String,
205
- default: ''
206
- },
207
- high_school_graduated_year: {
208
- type: String,
209
- default: ''
210
- },
211
- attended_university: {
212
- type: String,
213
- default: ''
214
- },
215
- attended_university_program: {
216
- type: String,
217
- default: ''
218
- },
219
- isGraduated: {
220
- type: String,
221
- default: '-'
222
- },
223
- expected_grad_date: {
224
- type: String,
225
- default: ''
226
- },
227
- Highest_GPA_Uni: {
228
- type: Number
229
- },
230
- Passing_GPA_Uni: {
231
- type: Number
232
- },
233
- My_GPA_Uni: {
234
- type: Number
235
- },
236
- Has_Exchange_Experience: {
237
- type: String,
238
- default: '-'
239
- },
240
- isSecondGraduated: {
241
- type: String,
242
- default: '-'
243
- },
244
- expectedSecondDegreeGradDate: {
245
- type: String,
246
- default: ''
247
- },
248
- attendedSecondDegreeUniversity: {
249
- type: String,
250
- default: ''
251
- },
252
- attendedSecondDegreeProgram: {
253
- type: String,
254
- default: ''
255
- },
256
- highestSecondDegreeGPA: {
257
- type: Number
258
- },
259
- passingSecondDegreeGPA: {
260
- type: Number
261
- },
262
- mySecondDegreeGPA: {
263
- type: Number
264
- },
265
- Has_Internship_Experience: {
266
- type: String,
267
- default: '-'
268
- },
269
- Has_Working_Experience: {
270
- type: String,
271
- default: '-'
272
- },
273
- updatedAt: Date
274
- },
275
- language: {
276
- english_isPassed: {
277
- type: String,
278
- default: '-'
279
- },
280
- english_certificate: {
281
- type: String,
282
- default: ''
283
- },
284
- english_score: {
285
- type: String,
286
- default: ''
287
- },
288
- english_score_reading: {
289
- type: String,
290
- default: ''
291
- },
292
- english_score_listening: {
293
- type: String,
294
- default: ''
295
- },
296
- english_score_writing: {
297
- type: String,
298
- default: ''
299
- },
300
- english_score_speaking: {
301
- type: String,
302
- default: ''
303
- },
304
- english_test_date: {
305
- type: String,
306
- default: ''
307
- },
308
- german_isPassed: {
309
- type: String,
310
- default: '-'
311
- },
312
- german_certificate: {
313
- type: String,
314
- default: ''
315
- },
316
- german_score: {
317
- type: String,
318
- default: ''
319
- },
320
- german_test_date: {
321
- type: String,
322
- default: ''
323
- },
324
- gre_isPassed: {
325
- type: String,
326
- default: '-'
327
- },
328
- gre_certificate: {
329
- type: String,
330
- default: ''
331
- },
332
- gre_score: {
333
- type: String,
334
- default: ''
335
- },
336
- gre_test_date: {
337
- type: String,
338
- default: ''
339
- },
340
- gmat_isPassed: {
341
- type: String,
342
- default: '-'
343
- },
344
- gmat_certificate: {
345
- type: String,
346
- default: ''
347
- },
348
- gmat_score: {
349
- type: String,
350
- default: ''
351
- },
352
- gmat_test_date: {
353
- type: String,
354
- default: ''
355
- },
356
- updatedAt: Date
357
- }
358
- },
359
- lastLoginAt: Date
360
- }, options);
361
- var studentSchema = new Schema({
362
- agents: [{ type: Schema.Types.ObjectId, ref: 'Agent' }],
363
- editors: [{ type: Schema.Types.ObjectId, ref: 'Editor' }],
364
- needEditor: { type: Boolean, default: false },
365
- applying_program_count: {
366
- type: Number,
367
- default: 0
368
- },
369
- attributes: [
370
- {
371
- type: attributeSchema,
372
- required: true
373
- }
374
- ],
375
- profile: [
376
- {
377
- name: {
378
- type: String,
379
- required: true
380
- },
381
- status: {
382
- type: String,
383
- enum: Object.values(DocumentStatusType),
384
- default: DocumentStatusType.Missing
385
- },
386
- required: {
387
- type: Boolean,
388
- required: true
389
- },
390
- path: {
391
- type: String,
392
- default: ''
393
- },
394
- feedback: {
395
- type: String,
396
- default: ''
397
- },
398
- // TODO: updateBy
399
- updatedAt: Date
400
- }
401
- ],
402
- generaldocs_threads: [
403
- {
404
- isFinalVersion: {
405
- type: Boolean,
406
- default: false
407
- },
408
- latest_message_left_by_id: {
409
- type: String,
410
- default: ''
411
- },
412
- doc_thread_id: { type: Schema.Types.ObjectId, ref: 'Documentthread' },
413
- updatedAt: Date,
414
- createdAt: Date
415
- }
416
- ]
417
- }, options);
418
- var externalSchema = new Schema({
419
- attribute: {
420
- can_update_program_list: {
421
- type: Boolean,
422
- default: false
423
- },
424
- can_update_course_analysis: {
425
- type: Boolean,
426
- default: false
427
- },
428
- can_add_articles: {
429
- type: Boolean,
430
- default: false
431
- }
432
- }
433
- }, options);
434
- var managerSchema = new Schema({
435
- agents: [{ type: Schema.Types.ObjectId, ref: 'Agent' }],
436
- editors: [{ type: Schema.Types.ObjectId, ref: 'Editor' }],
437
- manager_type: {
438
- type: String,
439
- enum: Object.values(ManagerType),
440
- default: ManagerType.None
441
- },
442
- manager_notification: {
443
- isRead_new_base_docs_uploaded: [
444
- {
445
- student_id: {
446
- type: String,
447
- default: ''
448
- }
449
- }
450
- ],
451
- isRead_new_programs_assigned: {
452
- type: Boolean,
453
- default: false
454
- }
455
- },
456
- attribute: {
457
- can_write_ml: {
458
- type: Boolean,
459
- default: false
460
- },
461
- can_write_rl: {
462
- type: Boolean,
463
- default: false
464
- },
465
- can_write_cv: {
466
- type: Boolean,
467
- default: false
468
- },
469
- can_write_essay: {
470
- type: Boolean,
471
- default: false
472
- },
473
- can_do_interview: {
474
- type: Boolean,
475
- default: false
476
- }
477
- }
478
- }, options);
479
- var officehours = {
480
- Monday: {
481
- active: { type: Boolean, default: false },
482
- time_slots: [{ type: Object }]
483
- },
484
- Tuesday: {
485
- active: { type: Boolean, default: false },
486
- time_slots: [{ type: Object }]
487
- },
488
- Wednesday: {
489
- active: { type: Boolean, default: false },
490
- time_slots: [{ type: Object }]
491
- },
492
- Thursday: {
493
- active: { type: Boolean, default: false },
494
- time_slots: [{ type: Object }]
495
- },
496
- Friday: {
497
- active: { type: Boolean, default: false },
498
- time_slots: [{ type: Object }]
499
- },
500
- Saturday: {
501
- active: { type: Boolean, default: false },
502
- time_slots: [{ type: Object }]
503
- },
504
- Sunday: {
505
- active: { type: Boolean, default: false },
506
- time_slots: [{ type: Object }]
507
- }
508
- };
509
- var agentSchema = new Schema({
510
- timezone: { type: String, default: '' },
511
- officehours: officehours,
512
- selfIntroduction: {
513
- type: String,
514
- default: ''
515
- },
516
- agent_notification: {
517
- isRead_new_base_docs_uploaded: [
518
- {
519
- student_id: {
520
- type: String,
521
- default: ''
522
- },
523
- student_firstname: {
524
- type: String,
525
- default: ''
526
- },
527
- student_lastname: {
528
- type: String,
529
- default: ''
530
- }
531
- }
532
- ],
533
- isRead_new_survey_updated: {
534
- type: Boolean,
535
- default: true
536
- },
537
- isRead_applications_status_changed: {
538
- type: Boolean,
539
- default: true
540
- },
541
- isRead_new_programs_assigned: {
542
- type: Boolean,
543
- default: false
544
- }
545
- }
546
- }, options);
547
- var editorSchema = new Schema({
548
- timezone: { type: String, default: '' },
549
- officehours: officehours,
550
- editor_notification: {
551
- isRead_survey_not_complete: {
552
- type: Boolean,
553
- default: false
554
- },
555
- isRead_base_documents_missing: {
556
- type: Boolean,
557
- default: false
558
- },
559
- isRead_base_documents_rejected: {
560
- type: Boolean,
561
- default: false
562
- },
563
- isRead_new_programs_assigned: {
564
- type: Boolean,
565
- default: false
566
- }
567
- },
568
- attribute: {
569
- can_write_ml: {
570
- type: Boolean,
571
- default: false
572
- },
573
- can_write_rl: {
574
- type: Boolean,
575
- default: false
576
- },
577
- can_write_cv: {
578
- type: Boolean,
579
- default: false
580
- },
581
- can_write_essay: {
582
- type: Boolean,
583
- default: false
584
- },
585
- can_do_interview: {
586
- type: Boolean,
587
- default: false
588
- }
589
- }
590
- }, options);
591
- module.exports = {
592
- attributeSchema: attributeSchema,
593
- userSchema: userSchema,
594
- studentSchema: studentSchema,
595
- agentSchema: agentSchema,
596
- externalSchema: externalSchema,
597
- editorSchema: editorSchema,
598
- managerSchema: managerSchema
599
- };
1
+ import { Schema } from 'mongoose';
2
+ import isEmail from 'validator/lib/isEmail';
3
+ import { DocumentStatusType } from '@taiger-common/core';
4
+ import { PROGRAM_SUBJECT_KEYS } from './Program';
5
+ var ManagerType = {
6
+ Agent: 'Agent',
7
+ Editor: 'Editor',
8
+ AgentAndEditor: 'AgentAndEditor',
9
+ None: 'None'
10
+ };
11
+ var options = { discriminatorKey: 'role', timestamps: true };
12
+ var attributeSchema = new Schema({
13
+ value: {
14
+ type: Number,
15
+ required: true
16
+ },
17
+ name: {
18
+ type: String,
19
+ required: true
20
+ }
21
+ });
22
+ var userSchema = new Schema({
23
+ firstname: {
24
+ type: String,
25
+ trim: true
26
+ },
27
+ firstname_chinese: {
28
+ type: String,
29
+ trim: true
30
+ },
31
+ lastname: {
32
+ type: String,
33
+ trim: true
34
+ },
35
+ lastname_chinese: {
36
+ type: String,
37
+ trim: true
38
+ },
39
+ email: {
40
+ type: String,
41
+ unique: true,
42
+ lowercase: true,
43
+ validate: [isEmail, 'Invalid email address']
44
+ },
45
+ pictureUrl: {
46
+ type: String
47
+ },
48
+ password: {
49
+ type: String,
50
+ select: false,
51
+ trim: true,
52
+ minlength: [8, 'Password must contain at least 8 characters']
53
+ },
54
+ archiv: { type: Boolean, default: false },
55
+ birthday: {
56
+ type: String,
57
+ default: ''
58
+ },
59
+ linkedIn: String,
60
+ lineId: String,
61
+ isAccountActivated: {
62
+ type: Boolean,
63
+ default: false
64
+ },
65
+ notification: {
66
+ isRead_survey_not_complete: {
67
+ type: Boolean,
68
+ default: false
69
+ },
70
+ isRead_uni_assist_task_assigned: {
71
+ type: Boolean,
72
+ default: false
73
+ },
74
+ isRead_new_agent_assigned: {
75
+ type: Boolean,
76
+ default: true
77
+ },
78
+ isRead_new_editor_assigned: {
79
+ type: Boolean,
80
+ default: true
81
+ },
82
+ isRead_new_cvmlrl_tasks_created: {
83
+ type: Boolean,
84
+ default: true
85
+ },
86
+ isRead_new_cvmlrl_messsage: {
87
+ type: Boolean,
88
+ default: true
89
+ },
90
+ isRead_base_documents_missing: {
91
+ type: Boolean,
92
+ default: false
93
+ },
94
+ isRead_base_documents_rejected: {
95
+ type: Boolean,
96
+ default: true
97
+ },
98
+ isRead_new_programs_assigned: {
99
+ type: Boolean,
100
+ default: false
101
+ }
102
+ },
103
+ taigerai: {
104
+ input: {
105
+ name: {
106
+ type: String,
107
+ default: ''
108
+ },
109
+ status: {
110
+ type: String,
111
+ enum: Object.values(DocumentStatusType),
112
+ default: DocumentStatusType.Missing
113
+ },
114
+ file_category: {
115
+ type: String,
116
+ default: 'Others'
117
+ },
118
+ path: {
119
+ type: String,
120
+ default: ''
121
+ },
122
+ // TODO: updateBy
123
+ updatedAt: Date
124
+ },
125
+ output: {
126
+ name: {
127
+ type: String,
128
+ default: ''
129
+ },
130
+ status: {
131
+ type: String,
132
+ enum: Object.values(DocumentStatusType),
133
+ default: DocumentStatusType.Missing
134
+ },
135
+ file_category: {
136
+ type: String,
137
+ default: 'Others'
138
+ },
139
+ path: {
140
+ type: String,
141
+ default: ''
142
+ },
143
+ // TODO: updateBy
144
+ updatedAt: Date
145
+ },
146
+ feedback: {
147
+ message: {
148
+ type: String,
149
+ default: ''
150
+ },
151
+ // TODO: updateBy
152
+ updatedAt: Date
153
+ }
154
+ },
155
+ application_preference: {
156
+ expected_application_date: {
157
+ type: String,
158
+ default: ''
159
+ },
160
+ expected_application_semester: {
161
+ type: String,
162
+ default: ''
163
+ },
164
+ target_program_language: {
165
+ type: String,
166
+ default: ''
167
+ },
168
+ // To be deprecated -> read only in frontend
169
+ target_application_field: {
170
+ type: String,
171
+ default: ''
172
+ },
173
+ targetApplicationSubjects: [
174
+ {
175
+ type: String,
176
+ enum: PROGRAM_SUBJECT_KEYS
177
+ }
178
+ ],
179
+ target_degree: {
180
+ type: String,
181
+ default: ''
182
+ },
183
+ considered_privat_universities: {
184
+ type: String,
185
+ default: '-'
186
+ },
187
+ special_wished: {
188
+ type: String,
189
+ default: ''
190
+ },
191
+ application_outside_germany: {
192
+ type: String,
193
+ default: '-'
194
+ },
195
+ updatedAt: Date
196
+ },
197
+ academic_background: {
198
+ university: {
199
+ high_school_isGraduated: {
200
+ type: String,
201
+ default: ''
202
+ },
203
+ attended_high_school: {
204
+ type: String,
205
+ default: ''
206
+ },
207
+ high_school_graduated_year: {
208
+ type: String,
209
+ default: ''
210
+ },
211
+ attended_university: {
212
+ type: String,
213
+ default: ''
214
+ },
215
+ attended_university_program: {
216
+ type: String,
217
+ default: ''
218
+ },
219
+ isGraduated: {
220
+ type: String,
221
+ default: '-'
222
+ },
223
+ expected_grad_date: {
224
+ type: String,
225
+ default: ''
226
+ },
227
+ Highest_GPA_Uni: {
228
+ type: Number
229
+ },
230
+ Passing_GPA_Uni: {
231
+ type: Number
232
+ },
233
+ My_GPA_Uni: {
234
+ type: Number
235
+ },
236
+ Has_Exchange_Experience: {
237
+ type: String,
238
+ default: '-'
239
+ },
240
+ isSecondGraduated: {
241
+ type: String,
242
+ default: '-'
243
+ },
244
+ expectedSecondDegreeGradDate: {
245
+ type: String,
246
+ default: ''
247
+ },
248
+ attendedSecondDegreeUniversity: {
249
+ type: String,
250
+ default: ''
251
+ },
252
+ attendedSecondDegreeProgram: {
253
+ type: String,
254
+ default: ''
255
+ },
256
+ highestSecondDegreeGPA: {
257
+ type: Number
258
+ },
259
+ passingSecondDegreeGPA: {
260
+ type: Number
261
+ },
262
+ mySecondDegreeGPA: {
263
+ type: Number
264
+ },
265
+ Has_Internship_Experience: {
266
+ type: String,
267
+ default: '-'
268
+ },
269
+ Has_Working_Experience: {
270
+ type: String,
271
+ default: '-'
272
+ },
273
+ updatedAt: Date
274
+ },
275
+ language: {
276
+ english_isPassed: {
277
+ type: String,
278
+ default: '-'
279
+ },
280
+ english_certificate: {
281
+ type: String,
282
+ default: ''
283
+ },
284
+ english_score: {
285
+ type: String,
286
+ default: ''
287
+ },
288
+ english_score_reading: {
289
+ type: String,
290
+ default: ''
291
+ },
292
+ english_score_listening: {
293
+ type: String,
294
+ default: ''
295
+ },
296
+ english_score_writing: {
297
+ type: String,
298
+ default: ''
299
+ },
300
+ english_score_speaking: {
301
+ type: String,
302
+ default: ''
303
+ },
304
+ english_test_date: {
305
+ type: String,
306
+ default: ''
307
+ },
308
+ german_isPassed: {
309
+ type: String,
310
+ default: '-'
311
+ },
312
+ german_certificate: {
313
+ type: String,
314
+ default: ''
315
+ },
316
+ german_score: {
317
+ type: String,
318
+ default: ''
319
+ },
320
+ german_test_date: {
321
+ type: String,
322
+ default: ''
323
+ },
324
+ gre_isPassed: {
325
+ type: String,
326
+ default: '-'
327
+ },
328
+ gre_certificate: {
329
+ type: String,
330
+ default: ''
331
+ },
332
+ gre_score: {
333
+ type: String,
334
+ default: ''
335
+ },
336
+ gre_test_date: {
337
+ type: String,
338
+ default: ''
339
+ },
340
+ gmat_isPassed: {
341
+ type: String,
342
+ default: '-'
343
+ },
344
+ gmat_certificate: {
345
+ type: String,
346
+ default: ''
347
+ },
348
+ gmat_score: {
349
+ type: String,
350
+ default: ''
351
+ },
352
+ gmat_test_date: {
353
+ type: String,
354
+ default: ''
355
+ },
356
+ updatedAt: Date
357
+ }
358
+ },
359
+ lastLoginAt: Date
360
+ }, options);
361
+ var studentSchema = new Schema({
362
+ agents: [{ type: Schema.Types.ObjectId, ref: 'Agent' }],
363
+ editors: [{ type: Schema.Types.ObjectId, ref: 'Editor' }],
364
+ needEditor: { type: Boolean, default: false },
365
+ applying_program_count: {
366
+ type: Number,
367
+ default: 0
368
+ },
369
+ attributes: [
370
+ {
371
+ type: attributeSchema,
372
+ required: true
373
+ }
374
+ ],
375
+ profile: [
376
+ {
377
+ name: {
378
+ type: String,
379
+ required: true
380
+ },
381
+ status: {
382
+ type: String,
383
+ enum: Object.values(DocumentStatusType),
384
+ default: DocumentStatusType.Missing
385
+ },
386
+ required: {
387
+ type: Boolean,
388
+ required: true
389
+ },
390
+ path: {
391
+ type: String,
392
+ default: ''
393
+ },
394
+ feedback: {
395
+ type: String,
396
+ default: ''
397
+ },
398
+ // TODO: updateBy
399
+ updatedAt: Date
400
+ }
401
+ ],
402
+ generaldocs_threads: [
403
+ {
404
+ isFinalVersion: {
405
+ type: Boolean,
406
+ default: false
407
+ },
408
+ latest_message_left_by_id: {
409
+ type: String,
410
+ default: ''
411
+ },
412
+ doc_thread_id: { type: Schema.Types.ObjectId, ref: 'Documentthread' },
413
+ updatedAt: Date,
414
+ createdAt: Date
415
+ }
416
+ ]
417
+ }, options);
418
+ var externalSchema = new Schema({
419
+ attribute: {
420
+ can_update_program_list: {
421
+ type: Boolean,
422
+ default: false
423
+ },
424
+ can_update_course_analysis: {
425
+ type: Boolean,
426
+ default: false
427
+ },
428
+ can_add_articles: {
429
+ type: Boolean,
430
+ default: false
431
+ }
432
+ }
433
+ }, options);
434
+ var managerSchema = new Schema({
435
+ agents: [{ type: Schema.Types.ObjectId, ref: 'Agent' }],
436
+ editors: [{ type: Schema.Types.ObjectId, ref: 'Editor' }],
437
+ manager_type: {
438
+ type: String,
439
+ enum: Object.values(ManagerType),
440
+ default: ManagerType.None
441
+ },
442
+ manager_notification: {
443
+ isRead_new_base_docs_uploaded: [
444
+ {
445
+ student_id: {
446
+ type: String,
447
+ default: ''
448
+ }
449
+ }
450
+ ],
451
+ isRead_new_programs_assigned: {
452
+ type: Boolean,
453
+ default: false
454
+ }
455
+ },
456
+ attribute: {
457
+ can_write_ml: {
458
+ type: Boolean,
459
+ default: false
460
+ },
461
+ can_write_rl: {
462
+ type: Boolean,
463
+ default: false
464
+ },
465
+ can_write_cv: {
466
+ type: Boolean,
467
+ default: false
468
+ },
469
+ can_write_essay: {
470
+ type: Boolean,
471
+ default: false
472
+ },
473
+ can_do_interview: {
474
+ type: Boolean,
475
+ default: false
476
+ }
477
+ }
478
+ }, options);
479
+ var officehours = {
480
+ Monday: {
481
+ active: { type: Boolean, default: false },
482
+ time_slots: [{ type: Object }]
483
+ },
484
+ Tuesday: {
485
+ active: { type: Boolean, default: false },
486
+ time_slots: [{ type: Object }]
487
+ },
488
+ Wednesday: {
489
+ active: { type: Boolean, default: false },
490
+ time_slots: [{ type: Object }]
491
+ },
492
+ Thursday: {
493
+ active: { type: Boolean, default: false },
494
+ time_slots: [{ type: Object }]
495
+ },
496
+ Friday: {
497
+ active: { type: Boolean, default: false },
498
+ time_slots: [{ type: Object }]
499
+ },
500
+ Saturday: {
501
+ active: { type: Boolean, default: false },
502
+ time_slots: [{ type: Object }]
503
+ },
504
+ Sunday: {
505
+ active: { type: Boolean, default: false },
506
+ time_slots: [{ type: Object }]
507
+ }
508
+ };
509
+ var agentSchema = new Schema({
510
+ timezone: { type: String, default: '' },
511
+ officehours: officehours,
512
+ selfIntroduction: {
513
+ type: String,
514
+ default: ''
515
+ },
516
+ agent_notification: {
517
+ isRead_new_base_docs_uploaded: [
518
+ {
519
+ student_id: {
520
+ type: String,
521
+ default: ''
522
+ },
523
+ student_firstname: {
524
+ type: String,
525
+ default: ''
526
+ },
527
+ student_lastname: {
528
+ type: String,
529
+ default: ''
530
+ }
531
+ }
532
+ ],
533
+ isRead_new_survey_updated: {
534
+ type: Boolean,
535
+ default: true
536
+ },
537
+ isRead_applications_status_changed: {
538
+ type: Boolean,
539
+ default: true
540
+ },
541
+ isRead_new_programs_assigned: {
542
+ type: Boolean,
543
+ default: false
544
+ }
545
+ }
546
+ }, options);
547
+ var editorSchema = new Schema({
548
+ timezone: { type: String, default: '' },
549
+ officehours: officehours,
550
+ editor_notification: {
551
+ isRead_survey_not_complete: {
552
+ type: Boolean,
553
+ default: false
554
+ },
555
+ isRead_base_documents_missing: {
556
+ type: Boolean,
557
+ default: false
558
+ },
559
+ isRead_base_documents_rejected: {
560
+ type: Boolean,
561
+ default: false
562
+ },
563
+ isRead_new_programs_assigned: {
564
+ type: Boolean,
565
+ default: false
566
+ }
567
+ },
568
+ attribute: {
569
+ can_write_ml: {
570
+ type: Boolean,
571
+ default: false
572
+ },
573
+ can_write_rl: {
574
+ type: Boolean,
575
+ default: false
576
+ },
577
+ can_write_cv: {
578
+ type: Boolean,
579
+ default: false
580
+ },
581
+ can_write_essay: {
582
+ type: Boolean,
583
+ default: false
584
+ },
585
+ can_do_interview: {
586
+ type: Boolean,
587
+ default: false
588
+ }
589
+ }
590
+ }, options);
591
+ module.exports = {
592
+ attributeSchema: attributeSchema,
593
+ userSchema: userSchema,
594
+ studentSchema: studentSchema,
595
+ agentSchema: agentSchema,
596
+ externalSchema: externalSchema,
597
+ editorSchema: editorSchema,
598
+ managerSchema: managerSchema
599
+ };