@taiger-common/model 1.0.57 → 1.0.58

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 (135) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +23 -23
  3. package/dist/cjs/index.js +0 -2
  4. package/dist/cjs/model/Documentthread.js +4 -2
  5. package/dist/cjs/model/Program.js +83 -331
  6. package/dist/cjs/model/User.js +139 -78
  7. package/dist/cjs/model/index.js +1 -1
  8. package/dist/esm/index.js +0 -2
  9. package/dist/esm/model/Documentthread.js +4 -2
  10. package/dist/esm/model/Program.js +78 -326
  11. package/dist/esm/model/User.js +124 -62
  12. package/dist/esm/model/index.js +1 -1
  13. package/dist/types/index.d.ts +0 -2
  14. package/dist/types/model/Allcourse.d.ts +27 -6
  15. package/dist/types/model/Audit.d.ts +43 -18
  16. package/dist/types/model/Basedocumentationslink.d.ts +16 -11
  17. package/dist/types/model/Communication.d.ts +71 -22
  18. package/dist/types/model/Complaint.d.ts +170 -25
  19. package/dist/types/model/Course.d.ts +49 -23
  20. package/dist/types/model/Docspage.d.ts +37 -14
  21. package/dist/types/model/Documentation.d.ts +28 -15
  22. package/dist/types/model/Documentthread.d.ts +178 -35
  23. package/dist/types/model/Event.d.ts +54 -15
  24. package/dist/types/model/Internaldoc.d.ts +28 -15
  25. package/dist/types/model/Interval.d.ts +26 -13
  26. package/dist/types/model/Interview.d.ts +50 -23
  27. package/dist/types/model/InterviewSurveyResponse.d.ts +62 -20
  28. package/dist/types/model/Keywordset.d.ts +44 -14
  29. package/dist/types/model/Note.d.ts +13 -11
  30. package/dist/types/model/Permission.d.ts +56 -21
  31. package/dist/types/model/Program.d.ts +232 -387
  32. package/dist/types/model/Programrequirement.d.ts +140 -37
  33. package/dist/types/model/ResponseTime.d.ts +17 -12
  34. package/dist/types/model/SurveyInput.d.ts +90 -23
  35. package/dist/types/model/Template.d.ts +13 -8
  36. package/dist/types/model/Tenant.d.ts +13 -10
  37. package/dist/types/model/Ticket.d.ts +38 -16
  38. package/dist/types/model/Token.d.ts +12 -10
  39. package/dist/types/model/User.d.ts +1 -2148
  40. package/dist/types/model/index.d.ts +1 -1
  41. package/dist/umd/index.js +1 -1
  42. package/package.json +1 -1
  43. package/dist/cjs/api/account.js +0 -35
  44. package/dist/cjs/api/applications.js +0 -46
  45. package/dist/cjs/api/audit.js +0 -8
  46. package/dist/cjs/api/auth.js +0 -19
  47. package/dist/cjs/api/common.js +0 -32
  48. package/dist/cjs/api/communications.js +0 -15
  49. package/dist/cjs/api/courses.js +0 -23
  50. package/dist/cjs/api/crm.js +0 -87
  51. package/dist/cjs/api/documentThreads.js +0 -44
  52. package/dist/cjs/api/documentations.js +0 -33
  53. package/dist/cjs/api/events.js +0 -22
  54. package/dist/cjs/api/index.js +0 -41
  55. package/dist/cjs/api/interviews.js +0 -35
  56. package/dist/cjs/api/meetings.js +0 -20
  57. package/dist/cjs/api/notes.js +0 -8
  58. package/dist/cjs/api/permissions.js +0 -9
  59. package/dist/cjs/api/portals.js +0 -24
  60. package/dist/cjs/api/programRequirements.js +0 -26
  61. package/dist/cjs/api/programs.js +0 -93
  62. package/dist/cjs/api/search.js +0 -24
  63. package/dist/cjs/api/serialized.js +0 -50
  64. package/dist/cjs/api/students.js +0 -29
  65. package/dist/cjs/api/teams.js +0 -48
  66. package/dist/cjs/api/tickets.js +0 -21
  67. package/dist/cjs/api/users.js +0 -42
  68. package/dist/cjs/api/widgets.js +0 -21
  69. package/dist/cjs/constants/users.js +0 -12
  70. package/dist/cjs/model/Application.js +0 -78
  71. package/dist/cjs/schema/index.js +0 -22
  72. package/dist/cjs/schema/models.js +0 -523
  73. package/dist/cjs/schema/serialized.js +0 -202
  74. package/dist/esm/api/account.js +0 -32
  75. package/dist/esm/api/applications.js +0 -43
  76. package/dist/esm/api/audit.js +0 -5
  77. package/dist/esm/api/auth.js +0 -16
  78. package/dist/esm/api/common.js +0 -27
  79. package/dist/esm/api/communications.js +0 -12
  80. package/dist/esm/api/courses.js +0 -20
  81. package/dist/esm/api/crm.js +0 -84
  82. package/dist/esm/api/documentThreads.js +0 -41
  83. package/dist/esm/api/documentations.js +0 -30
  84. package/dist/esm/api/events.js +0 -19
  85. package/dist/esm/api/index.js +0 -25
  86. package/dist/esm/api/interviews.js +0 -32
  87. package/dist/esm/api/meetings.js +0 -17
  88. package/dist/esm/api/notes.js +0 -5
  89. package/dist/esm/api/permissions.js +0 -6
  90. package/dist/esm/api/portals.js +0 -21
  91. package/dist/esm/api/programRequirements.js +0 -23
  92. package/dist/esm/api/programs.js +0 -90
  93. package/dist/esm/api/search.js +0 -21
  94. package/dist/esm/api/serialized.js +0 -13
  95. package/dist/esm/api/students.js +0 -26
  96. package/dist/esm/api/teams.js +0 -45
  97. package/dist/esm/api/tickets.js +0 -18
  98. package/dist/esm/api/users.js +0 -39
  99. package/dist/esm/api/widgets.js +0 -18
  100. package/dist/esm/constants/users.js +0 -9
  101. package/dist/esm/model/Application.js +0 -75
  102. package/dist/esm/schema/index.js +0 -6
  103. package/dist/esm/schema/models.js +0 -520
  104. package/dist/esm/schema/serialized.js +0 -199
  105. package/dist/types/api/account.d.ts +0 -503
  106. package/dist/types/api/applications.d.ts +0 -3417
  107. package/dist/types/api/audit.d.ts +0 -89
  108. package/dist/types/api/auth.d.ts +0 -3411
  109. package/dist/types/api/common.d.ts +0 -90
  110. package/dist/types/api/communications.d.ts +0 -617
  111. package/dist/types/api/courses.d.ts +0 -849
  112. package/dist/types/api/crm.d.ts +0 -1113
  113. package/dist/types/api/documentThreads.d.ts +0 -38257
  114. package/dist/types/api/documentations.d.ts +0 -933
  115. package/dist/types/api/events.d.ts +0 -7209
  116. package/dist/types/api/index.d.ts +0 -25
  117. package/dist/types/api/interviews.d.ts +0 -802
  118. package/dist/types/api/meetings.d.ts +0 -49
  119. package/dist/types/api/notes.d.ts +0 -85
  120. package/dist/types/api/permissions.d.ts +0 -195
  121. package/dist/types/api/portals.d.ts +0 -770
  122. package/dist/types/api/programRequirements.d.ts +0 -2685
  123. package/dist/types/api/programs.d.ts +0 -3046
  124. package/dist/types/api/search.d.ts +0 -292
  125. package/dist/types/api/serialized.d.ts +0 -7
  126. package/dist/types/api/students.d.ts +0 -307
  127. package/dist/types/api/teams.d.ts +0 -3671
  128. package/dist/types/api/tickets.d.ts +0 -960
  129. package/dist/types/api/users.d.ts +0 -6960
  130. package/dist/types/api/widgets.d.ts +0 -234
  131. package/dist/types/constants/users.d.ts +0 -9
  132. package/dist/types/model/Application.d.ts +0 -85
  133. package/dist/types/schema/index.d.ts +0 -6
  134. package/dist/types/schema/models.d.ts +0 -2038
  135. package/dist/types/schema/serialized.d.ts +0 -8823
@@ -1,305 +1,81 @@
1
- var _a;
2
1
  import { Schema } from 'mongoose';
2
+ import { DIFFICULTY, PROGRAM_SUBJECTS, SCHOOL_TAGS, SCHOOL_TYPES } from '@taiger-common/core';
3
3
  var ObjectId = Schema.Types.ObjectId;
4
- export var PROGRAM_SUBJECTS = {
5
- LING: {
6
- label: 'Linguistics',
7
- category: 'AH'
8
- },
9
- MUS: {
10
- label: 'Music',
11
- category: 'AH'
12
- },
13
- THEO: {
14
- label: 'Theology, Divinity and Religious Studies',
15
- category: 'AH'
16
- },
17
- ARCH: {
18
- label: 'Archaeology',
19
- category: 'AH'
20
- },
21
- 'ARCH-BE': {
22
- label: 'Architecture and Built Environment',
23
- category: 'AH'
24
- },
25
- 'ART-DES': {
26
- label: 'Art and Design',
27
- category: 'AH'
28
- },
29
- CLAH: {
30
- label: 'Classics and Ancient History',
31
- category: 'AH'
32
- },
33
- ELL: {
34
- label: 'English Language and Literature',
35
- category: 'AH'
36
- },
37
- HIST: {
38
- label: 'History',
39
- category: 'AH'
40
- },
41
- ARTH: {
42
- label: 'Art History',
43
- category: 'AH'
44
- },
45
- 'MOD-LANG': {
46
- label: 'Modern Languages',
47
- category: 'AH'
48
- },
49
- 'PERF-ART': {
50
- label: 'Performing Arts',
51
- category: 'AH'
52
- },
53
- PHIL: {
54
- label: 'Philosophy',
55
- category: 'AH'
56
- },
57
- 'CHEM-ENG': {
58
- label: 'Engineering - Chemical',
59
- category: 'ET'
60
- },
61
- 'CIV-STR-ENG': {
62
- label: 'Engineering - Civil and Structural',
63
- category: 'ET'
64
- },
65
- CSIS: {
66
- label: 'Computer Science and Information Systems',
67
- category: 'ET'
68
- },
69
- 'DS-AI': {
70
- label: 'Data Science and Artificial Intelligence',
71
- category: 'ET'
72
- },
73
- 'ELEC-ENG': {
74
- label: 'Engineering - Electrical and Electronic',
75
- category: 'ET'
76
- },
77
- 'PETRO-ENG': {
78
- label: 'Engineering - Petroleum',
79
- category: 'ET'
80
- },
81
- 'MECH-ENG': {
82
- label: 'Engineering - Mechanical',
83
- category: 'ET'
84
- },
85
- 'MIN-MIN-ENG': {
86
- label: 'Engineering - Mineral and Mining',
87
- category: 'ET'
88
- },
89
- 'AG-FOR': {
90
- label: 'Agriculture and Forestry',
91
- category: 'LSM'
92
- },
93
- 'ANA-PHYS': {
94
- label: 'Anatomy and Physiology',
95
- category: 'LSM'
96
- },
97
- 'BIO-SCI': {
98
- label: 'Biological Sciences',
99
- category: 'LSM'
100
- },
101
- DENT: {
102
- label: 'Dentistry',
103
- category: 'LSM'
104
- },
105
- MED: {
106
- label: 'Medicine',
107
- category: 'LSM'
108
- },
109
- NURS: {
110
- label: 'Nursing',
111
- category: 'LSM'
112
- },
113
- PHARM: {
114
- label: 'Pharmacy and Pharmacology',
115
- category: 'LSM'
116
- },
117
- PSYCH: {
118
- label: 'Psychology',
119
- category: 'LSM'
120
- },
121
- 'VET-SCI': {
122
- label: 'Veterinary Science',
123
- category: 'LSM'
124
- },
125
- CHEM: {
126
- label: 'Chemistry',
127
- category: 'NS'
128
- },
129
- 'EAR-MAR-SCI': {
130
- label: 'Earth and Marine Sciences',
131
- category: 'NS'
132
- },
133
- 'ENV-SCI': {
134
- label: 'Environmental Sciences',
135
- category: 'NS'
136
- },
137
- GEO: {
138
- label: 'Geography',
139
- category: 'NS'
140
- },
141
- GEOL: {
142
- label: 'Geology',
143
- category: 'NS'
144
- },
145
- GEOPH: {
146
- label: 'Geophysics',
147
- category: 'NS'
148
- },
149
- 'MAT-SCI': {
150
- label: 'Materials Sciences',
151
- category: 'NS'
152
- },
153
- MATH: {
154
- label: 'Mathematics',
155
- category: 'NS'
156
- },
157
- 'PHYS-ASTRO': {
158
- label: 'Physics and Astronomy',
159
- category: 'NS'
160
- },
161
- 'ACC-FIN': {
162
- label: 'Accounting and Finance',
163
- category: 'SSM'
164
- },
165
- ANTH: {
166
- label: 'Anthropology',
167
- category: 'SSM'
168
- },
169
- 'BUS-MGMT': {
170
- label: 'Business and Management Studies',
171
- category: 'SSM'
172
- },
173
- 'COMM-MEDIA': {
174
- label: 'Communication and Media Studies',
175
- category: 'SSM'
176
- },
177
- 'DEV-STUD': {
178
- label: 'Development Studies',
179
- category: 'SSM'
180
- },
181
- ECON: {
182
- label: 'Economics and Econometrics',
183
- category: 'SSM'
184
- },
185
- 'EDU-TRAIN': {
186
- label: 'Education and Training',
187
- category: 'SSM'
188
- },
189
- 'HOSP-MGMT': {
190
- label: 'Hospitality and Leisure Management',
191
- category: 'SSM'
192
- },
193
- LAW: {
194
- label: 'Law and Legal Studies',
195
- category: 'SSM'
196
- },
197
- 'LIB-INFO': {
198
- label: 'Library and Information Management',
199
- category: 'SSM'
200
- },
201
- MKT: {
202
- label: 'Marketing',
203
- category: 'SSM'
204
- },
205
- POL: {
206
- label: 'Politics',
207
- category: 'SSM'
208
- },
209
- 'SOC-POL': {
210
- label: 'Social Policy and Administration',
211
- category: 'SSM'
212
- },
213
- SOC: {
214
- label: 'Sociology',
215
- category: 'SSM'
216
- },
217
- SPORT: {
218
- label: 'Sports-Related Subjects',
219
- category: 'SSM'
220
- },
221
- 'STAT-OR': {
222
- label: 'Statistics and Operational Research',
223
- category: 'SSM'
224
- }
225
- };
226
- export var SemesterType;
227
- (function (SemesterType) {
228
- SemesterType["SummerSemester"] = "SS";
229
- SemesterType["WinterSemester"] = "WS";
230
- SemesterType["Rolling"] = "Rolling";
231
- })(SemesterType || (SemesterType = {}));
232
- var Category;
233
- (function (Category) {
234
- Category["TU9"] = "TU9";
235
- Category["U15"] = "U15";
236
- Category["EUROTECH"] = "EUROTECH";
237
- Category["GERMAN_ELITE"] = "GERMAN_ELITE";
238
- Category["TOP50"] = "TOP50";
239
- Category["TIME"] = "TIME";
240
- Category["TOP100"] = "TOP100";
241
- Category["TOP150"] = "TOP150";
242
- Category["TOP250"] = "TOP250";
243
- Category["TOP500"] = "TOP500";
244
- })(Category || (Category = {}));
245
- export var DIFFICULTY = {
246
- EASY: 'EASY',
247
- HARD: 'HARD'
248
- };
249
- export var SCHOOL_TAGS = (_a = {},
250
- _a[Category.U15] = {
251
- label: 'U15',
252
- category: 'U15'
253
- },
254
- _a[Category.TU9] = {
255
- label: 'TU9 German Universities of Technology',
256
- category: 'TU9'
257
- },
258
- _a[Category.EUROTECH] = {
259
- label: 'EuroTech Universities Alliance',
260
- category: 'EUROTECH'
261
- },
262
- _a[Category.GERMAN_ELITE] = {
263
- label: 'German Excellence Initiative',
264
- category: 'GERMAN_ELITE'
265
- },
266
- _a[Category.TIME] = {
267
- label: 'Top International Managers in Engineering',
268
- category: 'TIME'
269
- },
270
- _a[Category.TOP50] = {
271
- label: 'QS Top 50 Universities',
272
- category: 'TOP50'
273
- },
274
- _a[Category.TOP100] = {
275
- label: 'QS Top 100 Universities',
276
- category: 'TOP100'
277
- },
278
- _a[Category.TOP150] = {
279
- label: 'QS Top 150 Universities',
280
- category: 'TOP150'
281
- },
282
- _a[Category.TOP250] = {
283
- label: 'QS Top 250 Universities',
284
- category: 'TOP150'
285
- },
286
- _a[Category.TOP500] = {
287
- label: 'QS Top 500 Universities',
288
- category: 'TOP500'
289
- },
290
- _a);
291
- export var SchoolType;
292
- (function (SchoolType) {
293
- SchoolType["University"] = "University";
294
- SchoolType["University_of_Applied_Sciences"] = "University_of_Applied_Sciences";
295
- })(SchoolType || (SchoolType = {}));
296
- export var SCHOOL_TYPES = [
297
- SchoolType.University,
298
- SchoolType.University_of_Applied_Sciences
299
- ];
300
4
  var SCHOOL_TAG_KEYS = Object.keys(SCHOOL_TAGS);
301
5
  export var PROGRAM_SUBJECT_KEYS = Object.keys(PROGRAM_SUBJECTS);
302
6
  export var DIFFICULTY_KEYS = Object.keys(DIFFICULTY);
7
+ // export type ProgramModule = {
8
+ // [key: string]: any; // Allows dynamic key access
9
+ // } & {
10
+ // isArchiv: boolean;
11
+ // school: string;
12
+ // program_name: string;
13
+ // programSubjects: string[];
14
+ // degree?: string;
15
+ // semester?: string;
16
+ // lang?: string;
17
+ // gpa_requirement?: string;
18
+ // allowOnlyGraduatedApplicant?: boolean;
19
+ // application_start?: string;
20
+ // application_deadline?: string;
21
+ // uni_assist?: string;
22
+ // englishTestHandLater?: boolean;
23
+ // toefl?: string;
24
+ // toefl_reading?: number;
25
+ // toefl_listening?: number;
26
+ // toefl_writing?: number;
27
+ // toefl_speaking?: number;
28
+ // ielts?: string;
29
+ // ielts_reading?: number;
30
+ // ielts_listening?: number;
31
+ // ielts_writing?: number;
32
+ // ielts_speaking?: number;
33
+ // germanTestHandLater?: boolean;
34
+ // testdaf?: string;
35
+ // basic_german_requirement?: string;
36
+ // gre?: string;
37
+ // gre_verbal?: number;
38
+ // gre_quantitative?: number;
39
+ // gre_analytical_writing?: number;
40
+ // gmat?: string;
41
+ // ml_required?: string;
42
+ // ml_requirements?: string;
43
+ // rl_required?: string;
44
+ // rl_requirements?: string;
45
+ // is_rl_specific?: boolean;
46
+ // essay_required?: string;
47
+ // essay_requirements?: string;
48
+ // portfolio_required?: string;
49
+ // portfolio_requirements?: string;
50
+ // supplementary_form_required?: string;
51
+ // supplementary_form_requirements?: string;
52
+ // curriculum_analysis_required?: string;
53
+ // curriculum_analysis_requirements?: string;
54
+ // scholarship_form_required?: string;
55
+ // scholarship_form_requirements?: string;
56
+ // module_description_required?: string;
57
+ // ects_requirements?: string;
58
+ // special_notes?: string;
59
+ // comments?: string;
60
+ // application_portal_a?: string;
61
+ // application_portal_b?: string;
62
+ // application_portal_a_instructions?: string;
63
+ // application_portal_b_instructions?: string;
64
+ // uni_assist_link?: string;
65
+ // website?: string;
66
+ // fpso?: string;
67
+ // updatedAt?: Date;
68
+ // whoupdated?: string;
69
+ // tuition_fees?: string;
70
+ // contact?: string;
71
+ // country?: string;
72
+ // isPrivateSchool?: boolean;
73
+ // isPartnerSchool?: boolean;
74
+ // schoolType?: string;
75
+ // tags?: string[];
76
+ // url?: string;
77
+ // vcId?: ObjectId;
78
+ // };
303
79
  export var programModule = {
304
80
  isArchiv: Boolean,
305
81
  school: {
@@ -408,20 +184,6 @@ export var programModule = {
408
184
  ml_requirements: {
409
185
  type: String
410
186
  },
411
- // statement of purpose
412
- sop_required: {
413
- type: String
414
- },
415
- sop_requirements: {
416
- type: String
417
- },
418
- // personal history of statement
419
- phs_required: {
420
- type: String
421
- },
422
- phs_requirements: {
423
- type: String
424
- },
425
187
  rl_required: {
426
188
  type: String
427
189
  },
@@ -508,10 +270,6 @@ export var programModule = {
508
270
  contact: {
509
271
  type: String
510
272
  },
511
- city: {
512
- type: String,
513
- default: ''
514
- },
515
273
  country: {
516
274
  type: String
517
275
  },
@@ -525,6 +283,10 @@ export var programModule = {
525
283
  type: String,
526
284
  enum: SCHOOL_TYPES
527
285
  },
286
+ isEssayConsultantNeeded: {
287
+ type: Boolean,
288
+ default: false
289
+ },
528
290
  tags: [
529
291
  {
530
292
  type: String,
@@ -532,16 +294,6 @@ export var programModule = {
532
294
  }
533
295
  ],
534
296
  url: String,
535
- isNC: {
536
- type: Boolean,
537
- default: false
538
- },
539
- zipCode: {
540
- type: String,
541
- default: ''
542
- },
543
297
  vcId: ObjectId
544
298
  };
545
- export var programSchema = new Schema(programModule, {
546
- timestamps: true
547
- });
299
+ export var programSchema = new Schema(programModule, { timestamps: true });
@@ -1,24 +1,15 @@
1
1
  import { Schema } from 'mongoose';
2
- import validator from 'validator';
3
- import { Role } from '../constants/users';
2
+ import isEmail from 'validator/lib/isEmail';
3
+ import { DocumentStatusType } from '@taiger-common/core';
4
4
  import { PROGRAM_SUBJECT_KEYS } from './Program';
5
- // --- Interfaces for frontend/backend type reference ---
6
- export var DocumentStatusType;
7
- (function (DocumentStatusType) {
8
- DocumentStatusType["Uploaded"] = "uploaded";
9
- DocumentStatusType["Missing"] = "missing";
10
- DocumentStatusType["Accepted"] = "accepted";
11
- DocumentStatusType["Rejected"] = "rejected";
12
- DocumentStatusType["NotNeeded"] = "notneeded";
13
- })(DocumentStatusType || (DocumentStatusType = {}));
14
- export var ManagerType = {
5
+ var ManagerType = {
15
6
  Agent: 'Agent',
16
7
  Editor: 'Editor',
17
8
  AgentAndEditor: 'AgentAndEditor',
18
9
  None: 'None'
19
10
  };
20
- export var options = { discriminatorKey: 'role', timestamps: true };
21
- export var attributeSchema = new Schema({
11
+ var options = { discriminatorKey: 'role', timestamps: true };
12
+ var attributeSchema = new Schema({
22
13
  value: {
23
14
  type: Number,
24
15
  required: true
@@ -28,12 +19,7 @@ export var attributeSchema = new Schema({
28
19
  required: true
29
20
  }
30
21
  });
31
- export var userSchema = new Schema({
32
- role: {
33
- type: String,
34
- enum: Object.values(Role),
35
- required: true
36
- },
22
+ var userSchema = new Schema({
37
23
  firstname: {
38
24
  type: String,
39
25
  trim: true
@@ -54,10 +40,7 @@ export var userSchema = new Schema({
54
40
  type: String,
55
41
  unique: true,
56
42
  lowercase: true,
57
- validate: [validator.isEmail, 'Invalid email address']
58
- },
59
- pictureUrl: {
60
- type: String
43
+ validate: [isEmail, 'Invalid email address']
61
44
  },
62
45
  password: {
63
46
  type: String,
@@ -372,10 +355,83 @@ export var userSchema = new Schema({
372
355
  },
373
356
  lastLoginAt: Date
374
357
  }, options);
375
- export var studentSchema = new Schema({
358
+ var applicationSchema = new Schema({
359
+ programId: { type: Schema.Types.ObjectId, ref: 'Program' },
360
+ uni_assist: {
361
+ status: {
362
+ type: String,
363
+ default: 'notstarted'
364
+ },
365
+ vpd_file_path: {
366
+ type: String,
367
+ default: ''
368
+ },
369
+ vpd_paid_confirmation_file_path: {
370
+ type: String,
371
+ default: ''
372
+ },
373
+ vpd_paid_confirmation_file_status: {
374
+ type: String,
375
+ default: ''
376
+ },
377
+ isPaid: {
378
+ type: Boolean,
379
+ default: false
380
+ },
381
+ updatedAt: Date
382
+ },
383
+ portal_credentials: {
384
+ application_portal_a: {
385
+ account: { type: String, select: false, trim: true },
386
+ password: { type: String, select: false, trim: true }
387
+ },
388
+ application_portal_b: {
389
+ account: { type: String, select: false, trim: true },
390
+ password: { type: String, select: false, trim: true }
391
+ }
392
+ },
393
+ doc_modification_thread: [
394
+ {
395
+ isFinalVersion: {
396
+ type: Boolean,
397
+ default: false
398
+ },
399
+ latest_message_left_by_id: {
400
+ type: String,
401
+ default: ''
402
+ },
403
+ doc_thread_id: { type: Schema.Types.ObjectId, ref: 'Documentthread' },
404
+ updatedAt: Date,
405
+ createdAt: Date
406
+ }
407
+ ],
408
+ reject_reason: {
409
+ type: String,
410
+ default: ''
411
+ },
412
+ admission_letter: {
413
+ status: {
414
+ type: String,
415
+ default: 'notstarted'
416
+ },
417
+ admission_file_path: {
418
+ type: String,
419
+ default: ''
420
+ },
421
+ comments: { type: String, default: '' },
422
+ updatedAt: Date
423
+ },
424
+ finalEnrolment: { type: Boolean, default: false },
425
+ decided: { type: String, default: '-' },
426
+ closed: { type: String, default: '-' },
427
+ admission: { type: String, default: '-' }
428
+ });
429
+ var studentSchema = new Schema({
376
430
  agents: [{ type: Schema.Types.ObjectId, ref: 'Agent' }],
377
431
  editors: [{ type: Schema.Types.ObjectId, ref: 'Editor' }],
378
432
  needEditor: { type: Boolean, default: false },
433
+ isInterviewTrained: { type: Boolean, default: false },
434
+ applications: [applicationSchema],
379
435
  applying_program_count: {
380
436
  type: Number,
381
437
  default: 0
@@ -429,7 +485,7 @@ export var studentSchema = new Schema({
429
485
  }
430
486
  ]
431
487
  }, options);
432
- export var externalSchema = new Schema({
488
+ var externalSchema = new Schema({
433
489
  attribute: {
434
490
  can_update_program_list: {
435
491
  type: Boolean,
@@ -445,7 +501,7 @@ export var externalSchema = new Schema({
445
501
  }
446
502
  }
447
503
  }, options);
448
- export var managerSchema = new Schema({
504
+ var managerSchema = new Schema({
449
505
  agents: [{ type: Schema.Types.ObjectId, ref: 'Agent' }],
450
506
  editors: [{ type: Schema.Types.ObjectId, ref: 'Editor' }],
451
507
  manager_type: {
@@ -490,39 +546,38 @@ export var managerSchema = new Schema({
490
546
  }
491
547
  }
492
548
  }, options);
493
- var officehours = {
494
- Monday: {
495
- active: { type: Boolean, default: false },
496
- time_slots: [{ type: Object }]
497
- },
498
- Tuesday: {
499
- active: { type: Boolean, default: false },
500
- time_slots: [{ type: Object }]
501
- },
502
- Wednesday: {
503
- active: { type: Boolean, default: false },
504
- time_slots: [{ type: Object }]
505
- },
506
- Thursday: {
507
- active: { type: Boolean, default: false },
508
- time_slots: [{ type: Object }]
509
- },
510
- Friday: {
511
- active: { type: Boolean, default: false },
512
- time_slots: [{ type: Object }]
513
- },
514
- Saturday: {
515
- active: { type: Boolean, default: false },
516
- time_slots: [{ type: Object }]
517
- },
518
- Sunday: {
519
- active: { type: Boolean, default: false },
520
- time_slots: [{ type: Object }]
521
- }
522
- };
523
- export var agentSchema = new Schema({
549
+ var agentSchema = new Schema({
524
550
  timezone: { type: String, default: '' },
525
- officehours: officehours,
551
+ officehours: {
552
+ Monday: {
553
+ active: { type: Boolean, default: false },
554
+ time_slots: [{ type: Object }]
555
+ },
556
+ Tuesday: {
557
+ active: { type: Boolean, default: false },
558
+ time_slots: [{ type: Object }]
559
+ },
560
+ Wednesday: {
561
+ active: { type: Boolean, default: false },
562
+ time_slots: [{ type: Object }]
563
+ },
564
+ Thursday: {
565
+ active: { type: Boolean, default: false },
566
+ time_slots: [{ type: Object }]
567
+ },
568
+ Friday: {
569
+ active: { type: Boolean, default: false },
570
+ time_slots: [{ type: Object }]
571
+ },
572
+ Saturday: {
573
+ active: { type: Boolean, default: false },
574
+ time_slots: [{ type: Object }]
575
+ },
576
+ Sunday: {
577
+ active: { type: Boolean, default: false },
578
+ time_slots: [{ type: Object }]
579
+ }
580
+ },
526
581
  selfIntroduction: {
527
582
  type: String,
528
583
  default: ''
@@ -558,9 +613,7 @@ export var agentSchema = new Schema({
558
613
  }
559
614
  }
560
615
  }, options);
561
- export var editorSchema = new Schema({
562
- timezone: { type: String, default: '' },
563
- officehours: officehours,
616
+ var editorSchema = new Schema({
564
617
  editor_notification: {
565
618
  isRead_survey_not_complete: {
566
619
  type: Boolean,
@@ -602,3 +655,12 @@ export var editorSchema = new Schema({
602
655
  }
603
656
  }
604
657
  }, options);
658
+ module.exports = {
659
+ attributeSchema: attributeSchema,
660
+ userSchema: userSchema,
661
+ studentSchema: studentSchema,
662
+ agentSchema: agentSchema,
663
+ externalSchema: externalSchema,
664
+ editorSchema: editorSchema,
665
+ managerSchema: managerSchema
666
+ };
@@ -1,5 +1,4 @@
1
1
  export * from './Allcourse';
2
- export * from './Application';
3
2
  export * from './Audit';
4
3
  export * from './Basedocumentationslink';
5
4
  export * from './Communication';
@@ -11,6 +10,7 @@ export * from './Documentthread';
11
10
  export * from './Event';
12
11
  export * from './Internaldoc';
13
12
  export * from './Interval';
13
+ export * from './Event';
14
14
  export * from './Interview';
15
15
  export * from './InterviewSurveyResponse';
16
16
  export * from './Keywordset';
@@ -1,3 +1 @@
1
1
  export * from './model';
2
- export * from './api';
3
- export * from './schema';