@taiger-common/model 1.0.4 → 1.0.6
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.
- package/dist/cjs/constants/index.js +7 -0
- package/dist/cjs/model/Allcourse.js +10 -0
- package/dist/cjs/model/Audit.js +22 -0
- package/dist/cjs/model/Basedocumentationslink.js +9 -0
- package/dist/cjs/model/Communication.js +30 -0
- package/dist/cjs/model/Complaint.js +70 -0
- package/dist/cjs/model/Course.js +24 -0
- package/dist/cjs/model/Documentation.js +13 -0
- package/dist/cjs/model/Documentthread.js +45 -0
- package/dist/cjs/model/Event.js +59 -0
- package/dist/cjs/model/index.js +10 -1
- package/dist/esm/constants/index.js +4 -0
- package/dist/esm/model/Allcourse.js +7 -0
- package/dist/esm/model/Audit.js +19 -0
- package/dist/esm/model/Basedocumentationslink.js +6 -0
- package/dist/esm/model/Communication.js +27 -0
- package/dist/esm/model/Complaint.js +67 -0
- package/dist/esm/model/Course.js +21 -0
- package/dist/esm/model/Documentation.js +10 -0
- package/dist/esm/model/Documentthread.js +42 -0
- package/dist/esm/model/Event.js +56 -0
- package/dist/esm/model/index.js +10 -1
- package/dist/types/constants/index.d.ts +4 -0
- package/dist/types/model/Allcourse.d.ts +25 -0
- package/dist/types/model/Audit.d.ts +25 -0
- package/dist/types/model/Basedocumentationslink.d.ts +15 -0
- package/dist/types/model/Communication.d.ts +37 -0
- package/dist/types/model/Complaint.d.ts +59 -0
- package/dist/types/model/Course.d.ts +48 -0
- package/dist/types/model/Documentation.d.ts +31 -0
- package/dist/types/model/Documentthread.d.ts +60 -0
- package/dist/types/model/Event.d.ts +60 -0
- package/dist/types/model/index.d.ts +10 -1
- package/dist/umd/index.js +1 -1
- package/package.json +1 -1
- /package/dist/cjs/model/{docspagesSchema.js → Docspage.js} +0 -0
- /package/dist/esm/model/{docspagesSchema.js → Docspage.js} +0 -0
- /package/dist/types/model/{docspagesSchema.d.ts → Docspage.d.ts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.allCourseSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
exports.allCourseSchema = {
|
|
6
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
7
|
+
all_course_chinese: { type: String, required: true },
|
|
8
|
+
all_course_english: { type: String, required: true },
|
|
9
|
+
description: { type: String, maxlength: 2000 }
|
|
10
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.auditSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
exports.auditSchema = {
|
|
6
|
+
performedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
7
|
+
targetUserId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
8
|
+
targetDocumentThreadId: {
|
|
9
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
10
|
+
ref: 'Documentthread'
|
|
11
|
+
},
|
|
12
|
+
interviewThreadId: {
|
|
13
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
14
|
+
ref: 'Interview'
|
|
15
|
+
},
|
|
16
|
+
action: String,
|
|
17
|
+
field: String,
|
|
18
|
+
changes: {
|
|
19
|
+
before: mongoose_1.Schema.Types.Mixed,
|
|
20
|
+
after: mongoose_1.Schema.Types.Mixed
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.basedocumentationslinksSchema = void 0;
|
|
4
|
+
exports.basedocumentationslinksSchema = {
|
|
5
|
+
key: { type: String, default: '' },
|
|
6
|
+
category: { type: String, default: 'general' },
|
|
7
|
+
link: { type: String, default: '' },
|
|
8
|
+
updatedAt: Date
|
|
9
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.communicationsSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
exports.communicationsSchema = {
|
|
6
|
+
student_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
7
|
+
user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
8
|
+
message: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: ''
|
|
11
|
+
},
|
|
12
|
+
readBy: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
|
|
13
|
+
timeStampReadBy: mongoose_1.Schema.Types.Mixed,
|
|
14
|
+
files: [
|
|
15
|
+
{
|
|
16
|
+
name: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
path: {
|
|
21
|
+
type: String,
|
|
22
|
+
required: true
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
createdAt: Date,
|
|
27
|
+
ignore_message: Boolean,
|
|
28
|
+
ignoredMessageUpdatedAt: Date,
|
|
29
|
+
ignoredMessageBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }
|
|
30
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.complaintSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
var constants_1 = require("../constants");
|
|
6
|
+
exports.complaintSchema = {
|
|
7
|
+
requester_id: {
|
|
8
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
9
|
+
required: true,
|
|
10
|
+
ref: 'User'
|
|
11
|
+
},
|
|
12
|
+
status: {
|
|
13
|
+
type: String,
|
|
14
|
+
enum: Object.values(constants_1.TicketStatus),
|
|
15
|
+
default: 'open'
|
|
16
|
+
},
|
|
17
|
+
title: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: '',
|
|
20
|
+
validate: {
|
|
21
|
+
validator: function (value) {
|
|
22
|
+
// Maximum allowed length
|
|
23
|
+
return value.length <= 200;
|
|
24
|
+
},
|
|
25
|
+
message: 'Description exceeds the maximum allowed length of 3000 characters'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
category: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'others'
|
|
31
|
+
},
|
|
32
|
+
description: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: '',
|
|
35
|
+
validate: {
|
|
36
|
+
validator: function (value) {
|
|
37
|
+
// Maximum allowed length
|
|
38
|
+
return value.length <= 3000;
|
|
39
|
+
},
|
|
40
|
+
message: 'Description exceeds the maximum allowed length of 3000 characters'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
messages: [
|
|
44
|
+
{
|
|
45
|
+
user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
46
|
+
message: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ''
|
|
49
|
+
},
|
|
50
|
+
createdAt: Date,
|
|
51
|
+
file: [
|
|
52
|
+
{
|
|
53
|
+
name: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: true
|
|
56
|
+
},
|
|
57
|
+
path: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: true
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
ignore_message: Boolean
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
createdAt: {
|
|
67
|
+
type: Date,
|
|
68
|
+
default: Date.now
|
|
69
|
+
}
|
|
70
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.coursesSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
exports.coursesSchema = {
|
|
6
|
+
student_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
7
|
+
name: { type: String, default: '' },
|
|
8
|
+
table_data_string: { type: String, default: '' },
|
|
9
|
+
table_data_string_locked: { type: Boolean, default: false },
|
|
10
|
+
table_data_string_taiger_guided: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: '[{"course_chinese":"","course_english":"","credits":"0","grades":""}]'
|
|
13
|
+
},
|
|
14
|
+
updatedAt: Date,
|
|
15
|
+
analysis: {
|
|
16
|
+
path: { type: String, default: '' },
|
|
17
|
+
analyzed_course: [{ type: String, default: '' }],
|
|
18
|
+
isAnalysed: { type: Boolean, default: false },
|
|
19
|
+
isAnalysedV2: { type: Boolean, default: false },
|
|
20
|
+
pathV2: { type: String, default: '' },
|
|
21
|
+
updatedAtV2: Date,
|
|
22
|
+
updatedAt: Date
|
|
23
|
+
}
|
|
24
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.documentationsSchema = void 0;
|
|
4
|
+
exports.documentationsSchema = {
|
|
5
|
+
name: { type: String, default: '' },
|
|
6
|
+
title: { type: String, default: '' },
|
|
7
|
+
category: { type: String, default: '' },
|
|
8
|
+
author: { type: String, default: '' },
|
|
9
|
+
prop: { type: String, default: '' },
|
|
10
|
+
text: { type: String, default: '' },
|
|
11
|
+
country: { type: String, default: '' },
|
|
12
|
+
updatedAt: Date
|
|
13
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.documentThreadsSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
exports.documentThreadsSchema = {
|
|
6
|
+
student_id: { type: mongoose_1.Schema.Types.ObjectId, require: true, ref: 'User' },
|
|
7
|
+
program_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'Program' },
|
|
8
|
+
outsourced_user_id: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
|
|
9
|
+
pin_by_user_id: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
|
|
10
|
+
flag_by_user_id: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
|
|
11
|
+
file_type: { type: String, require: true },
|
|
12
|
+
isFinalVersion: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
isOriginAuthorDeclarationConfirmedByStudent: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
isOriginAuthorDeclarationConfirmedByStudentTimestamp: Date,
|
|
21
|
+
messages: [
|
|
22
|
+
{
|
|
23
|
+
user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: 'User' },
|
|
24
|
+
message: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: ''
|
|
27
|
+
},
|
|
28
|
+
createdAt: Date,
|
|
29
|
+
file: [
|
|
30
|
+
{
|
|
31
|
+
name: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: true
|
|
34
|
+
},
|
|
35
|
+
path: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: true
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
ignore_message: Boolean
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
updatedAt: Date
|
|
45
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EventSchema = void 0;
|
|
4
|
+
var mongoose_1 = require("mongoose");
|
|
5
|
+
exports.EventSchema = {
|
|
6
|
+
requester_id: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
|
|
7
|
+
receiver_id: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'User' }],
|
|
8
|
+
isConfirmedRequester: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: false
|
|
11
|
+
},
|
|
12
|
+
isConfirmedReceiver: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
meetingLink: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: false
|
|
19
|
+
},
|
|
20
|
+
event_type: {
|
|
21
|
+
type: String
|
|
22
|
+
},
|
|
23
|
+
title: {
|
|
24
|
+
type: String
|
|
25
|
+
// required: [true, 'Please write a title for your event']
|
|
26
|
+
},
|
|
27
|
+
description: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: [true, 'Please write a description for your event'],
|
|
30
|
+
validate: {
|
|
31
|
+
validator: function (value) {
|
|
32
|
+
return value.length <= 2000; // Maximum allowed length
|
|
33
|
+
},
|
|
34
|
+
message: 'Description exceeds the maximum allowed length of 500 characters'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
start: {
|
|
38
|
+
type: Date,
|
|
39
|
+
required: [true, 'Please Insert The Start of your event'],
|
|
40
|
+
min: [new Date(), "time can't be before now!!"]
|
|
41
|
+
},
|
|
42
|
+
end: {
|
|
43
|
+
type: Date,
|
|
44
|
+
// setting a min function to accept any date one hour ahead of start
|
|
45
|
+
min: [
|
|
46
|
+
function () {
|
|
47
|
+
var date = new Date(this.start);
|
|
48
|
+
var validDate = new Date(date.getTime() + 60000);
|
|
49
|
+
return validDate;
|
|
50
|
+
},
|
|
51
|
+
'Event End must be at least one minute a head of event time'
|
|
52
|
+
],
|
|
53
|
+
default: function () {
|
|
54
|
+
var date = new Date(this.start);
|
|
55
|
+
var validDate = new Date(date.getTime() + 60000 * 30);
|
|
56
|
+
return validDate;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
package/dist/cjs/model/index.js
CHANGED
|
@@ -14,4 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./Allcourse"), exports);
|
|
18
|
+
__exportStar(require("./Audit"), exports);
|
|
19
|
+
__exportStar(require("./Basedocumentationslink"), exports);
|
|
20
|
+
__exportStar(require("./Communication"), exports);
|
|
21
|
+
__exportStar(require("./Complaint"), exports);
|
|
22
|
+
__exportStar(require("./Course"), exports);
|
|
23
|
+
__exportStar(require("./Docspage"), exports);
|
|
24
|
+
__exportStar(require("./Documentation"), exports);
|
|
25
|
+
__exportStar(require("./Documentthread"), exports);
|
|
26
|
+
__exportStar(require("./Event"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export var allCourseSchema = {
|
|
3
|
+
updatedBy: { type: Schema.Types.ObjectId, ref: 'User' },
|
|
4
|
+
all_course_chinese: { type: String, required: true },
|
|
5
|
+
all_course_english: { type: String, required: true },
|
|
6
|
+
description: { type: String, maxlength: 2000 }
|
|
7
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export var auditSchema = {
|
|
3
|
+
performedBy: { type: Schema.Types.ObjectId, ref: 'User' },
|
|
4
|
+
targetUserId: { type: Schema.Types.ObjectId, ref: 'User' },
|
|
5
|
+
targetDocumentThreadId: {
|
|
6
|
+
type: Schema.Types.ObjectId,
|
|
7
|
+
ref: 'Documentthread'
|
|
8
|
+
},
|
|
9
|
+
interviewThreadId: {
|
|
10
|
+
type: Schema.Types.ObjectId,
|
|
11
|
+
ref: 'Interview'
|
|
12
|
+
},
|
|
13
|
+
action: String,
|
|
14
|
+
field: String,
|
|
15
|
+
changes: {
|
|
16
|
+
before: Schema.Types.Mixed,
|
|
17
|
+
after: Schema.Types.Mixed
|
|
18
|
+
}
|
|
19
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export var communicationsSchema = {
|
|
3
|
+
student_id: { type: Schema.Types.ObjectId, ref: 'User' },
|
|
4
|
+
user_id: { type: Schema.Types.ObjectId, ref: 'User' },
|
|
5
|
+
message: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: ''
|
|
8
|
+
},
|
|
9
|
+
readBy: [{ type: Schema.Types.ObjectId, ref: 'User' }],
|
|
10
|
+
timeStampReadBy: Schema.Types.Mixed,
|
|
11
|
+
files: [
|
|
12
|
+
{
|
|
13
|
+
name: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
path: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
createdAt: Date,
|
|
24
|
+
ignore_message: Boolean,
|
|
25
|
+
ignoredMessageUpdatedAt: Date,
|
|
26
|
+
ignoredMessageBy: { type: Schema.Types.ObjectId, ref: 'User' }
|
|
27
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
import { TicketStatus } from '../constants';
|
|
3
|
+
export var complaintSchema = {
|
|
4
|
+
requester_id: {
|
|
5
|
+
type: Schema.Types.ObjectId,
|
|
6
|
+
required: true,
|
|
7
|
+
ref: 'User'
|
|
8
|
+
},
|
|
9
|
+
status: {
|
|
10
|
+
type: String,
|
|
11
|
+
enum: Object.values(TicketStatus),
|
|
12
|
+
default: 'open'
|
|
13
|
+
},
|
|
14
|
+
title: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: '',
|
|
17
|
+
validate: {
|
|
18
|
+
validator: function (value) {
|
|
19
|
+
// Maximum allowed length
|
|
20
|
+
return value.length <= 200;
|
|
21
|
+
},
|
|
22
|
+
message: 'Description exceeds the maximum allowed length of 3000 characters'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
category: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: 'others'
|
|
28
|
+
},
|
|
29
|
+
description: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: '',
|
|
32
|
+
validate: {
|
|
33
|
+
validator: function (value) {
|
|
34
|
+
// Maximum allowed length
|
|
35
|
+
return value.length <= 3000;
|
|
36
|
+
},
|
|
37
|
+
message: 'Description exceeds the maximum allowed length of 3000 characters'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
messages: [
|
|
41
|
+
{
|
|
42
|
+
user_id: { type: Schema.Types.ObjectId, ref: 'User' },
|
|
43
|
+
message: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: ''
|
|
46
|
+
},
|
|
47
|
+
createdAt: Date,
|
|
48
|
+
file: [
|
|
49
|
+
{
|
|
50
|
+
name: {
|
|
51
|
+
type: String,
|
|
52
|
+
required: true
|
|
53
|
+
},
|
|
54
|
+
path: {
|
|
55
|
+
type: String,
|
|
56
|
+
required: true
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
ignore_message: Boolean
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
createdAt: {
|
|
64
|
+
type: Date,
|
|
65
|
+
default: Date.now
|
|
66
|
+
}
|
|
67
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export var coursesSchema = {
|
|
3
|
+
student_id: { type: Schema.Types.ObjectId, ref: 'User' },
|
|
4
|
+
name: { type: String, default: '' },
|
|
5
|
+
table_data_string: { type: String, default: '' },
|
|
6
|
+
table_data_string_locked: { type: Boolean, default: false },
|
|
7
|
+
table_data_string_taiger_guided: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: '[{"course_chinese":"","course_english":"","credits":"0","grades":""}]'
|
|
10
|
+
},
|
|
11
|
+
updatedAt: Date,
|
|
12
|
+
analysis: {
|
|
13
|
+
path: { type: String, default: '' },
|
|
14
|
+
analyzed_course: [{ type: String, default: '' }],
|
|
15
|
+
isAnalysed: { type: Boolean, default: false },
|
|
16
|
+
isAnalysedV2: { type: Boolean, default: false },
|
|
17
|
+
pathV2: { type: String, default: '' },
|
|
18
|
+
updatedAtV2: Date,
|
|
19
|
+
updatedAt: Date
|
|
20
|
+
}
|
|
21
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var documentationsSchema = {
|
|
2
|
+
name: { type: String, default: '' },
|
|
3
|
+
title: { type: String, default: '' },
|
|
4
|
+
category: { type: String, default: '' },
|
|
5
|
+
author: { type: String, default: '' },
|
|
6
|
+
prop: { type: String, default: '' },
|
|
7
|
+
text: { type: String, default: '' },
|
|
8
|
+
country: { type: String, default: '' },
|
|
9
|
+
updatedAt: Date
|
|
10
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export var documentThreadsSchema = {
|
|
3
|
+
student_id: { type: Schema.Types.ObjectId, require: true, ref: 'User' },
|
|
4
|
+
program_id: { type: Schema.Types.ObjectId, ref: 'Program' },
|
|
5
|
+
outsourced_user_id: [{ type: Schema.Types.ObjectId, ref: 'User' }],
|
|
6
|
+
pin_by_user_id: [{ type: Schema.Types.ObjectId, ref: 'User' }],
|
|
7
|
+
flag_by_user_id: [{ type: Schema.Types.ObjectId, ref: 'User' }],
|
|
8
|
+
file_type: { type: String, require: true },
|
|
9
|
+
isFinalVersion: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
13
|
+
isOriginAuthorDeclarationConfirmedByStudent: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false
|
|
16
|
+
},
|
|
17
|
+
isOriginAuthorDeclarationConfirmedByStudentTimestamp: Date,
|
|
18
|
+
messages: [
|
|
19
|
+
{
|
|
20
|
+
user_id: { type: Schema.Types.ObjectId, ref: 'User' },
|
|
21
|
+
message: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ''
|
|
24
|
+
},
|
|
25
|
+
createdAt: Date,
|
|
26
|
+
file: [
|
|
27
|
+
{
|
|
28
|
+
name: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
path: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
ignore_message: Boolean
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
updatedAt: Date
|
|
42
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export var EventSchema = {
|
|
3
|
+
requester_id: [{ type: Schema.Types.ObjectId, ref: 'User' }],
|
|
4
|
+
receiver_id: [{ type: Schema.Types.ObjectId, ref: 'User' }],
|
|
5
|
+
isConfirmedRequester: {
|
|
6
|
+
type: Boolean,
|
|
7
|
+
default: false
|
|
8
|
+
},
|
|
9
|
+
isConfirmedReceiver: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
13
|
+
meetingLink: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: false
|
|
16
|
+
},
|
|
17
|
+
event_type: {
|
|
18
|
+
type: String
|
|
19
|
+
},
|
|
20
|
+
title: {
|
|
21
|
+
type: String
|
|
22
|
+
// required: [true, 'Please write a title for your event']
|
|
23
|
+
},
|
|
24
|
+
description: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: [true, 'Please write a description for your event'],
|
|
27
|
+
validate: {
|
|
28
|
+
validator: function (value) {
|
|
29
|
+
return value.length <= 2000; // Maximum allowed length
|
|
30
|
+
},
|
|
31
|
+
message: 'Description exceeds the maximum allowed length of 500 characters'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
start: {
|
|
35
|
+
type: Date,
|
|
36
|
+
required: [true, 'Please Insert The Start of your event'],
|
|
37
|
+
min: [new Date(), "time can't be before now!!"]
|
|
38
|
+
},
|
|
39
|
+
end: {
|
|
40
|
+
type: Date,
|
|
41
|
+
// setting a min function to accept any date one hour ahead of start
|
|
42
|
+
min: [
|
|
43
|
+
function () {
|
|
44
|
+
var date = new Date(this.start);
|
|
45
|
+
var validDate = new Date(date.getTime() + 60000);
|
|
46
|
+
return validDate;
|
|
47
|
+
},
|
|
48
|
+
'Event End must be at least one minute a head of event time'
|
|
49
|
+
],
|
|
50
|
+
default: function () {
|
|
51
|
+
var date = new Date(this.start);
|
|
52
|
+
var validDate = new Date(date.getTime() + 60000 * 30);
|
|
53
|
+
return validDate;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
package/dist/esm/model/index.js
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './Allcourse';
|
|
2
|
+
export * from './Audit';
|
|
3
|
+
export * from './Basedocumentationslink';
|
|
4
|
+
export * from './Communication';
|
|
5
|
+
export * from './Complaint';
|
|
6
|
+
export * from './Course';
|
|
7
|
+
export * from './Docspage';
|
|
8
|
+
export * from './Documentation';
|
|
9
|
+
export * from './Documentthread';
|
|
10
|
+
export * from './Event';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export interface IAllCourse {
|
|
3
|
+
updatedBy: Schema.Types.ObjectId;
|
|
4
|
+
all_course_chinese: string;
|
|
5
|
+
all_course_english: string;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const allCourseSchema: {
|
|
9
|
+
updatedBy: {
|
|
10
|
+
type: typeof Schema.Types.ObjectId;
|
|
11
|
+
ref: string;
|
|
12
|
+
};
|
|
13
|
+
all_course_chinese: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
required: boolean;
|
|
16
|
+
};
|
|
17
|
+
all_course_english: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
required: boolean;
|
|
20
|
+
};
|
|
21
|
+
description: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
maxlength: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const auditSchema: {
|
|
3
|
+
performedBy: {
|
|
4
|
+
type: typeof Schema.Types.ObjectId;
|
|
5
|
+
ref: string;
|
|
6
|
+
};
|
|
7
|
+
targetUserId: {
|
|
8
|
+
type: typeof Schema.Types.ObjectId;
|
|
9
|
+
ref: string;
|
|
10
|
+
};
|
|
11
|
+
targetDocumentThreadId: {
|
|
12
|
+
type: typeof Schema.Types.ObjectId;
|
|
13
|
+
ref: string;
|
|
14
|
+
};
|
|
15
|
+
interviewThreadId: {
|
|
16
|
+
type: typeof Schema.Types.ObjectId;
|
|
17
|
+
ref: string;
|
|
18
|
+
};
|
|
19
|
+
action: StringConstructor;
|
|
20
|
+
field: StringConstructor;
|
|
21
|
+
changes: {
|
|
22
|
+
before: typeof Schema.Types.Mixed;
|
|
23
|
+
after: typeof Schema.Types.Mixed;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const basedocumentationslinksSchema: {
|
|
2
|
+
key: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
category: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
link: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
updatedAt: DateConstructor;
|
|
15
|
+
};
|