@taiger-common/model 1.0.43 → 1.0.45

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