jp-shared 1.0.17 → 1.0.18
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.
|
@@ -18,7 +18,9 @@ const commonReportSchema = new mongoose.Schema({
|
|
|
18
18
|
issue:{
|
|
19
19
|
type: String
|
|
20
20
|
}
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
|
+
{ timestamps: { createdAt: true, updatedAt: true } }
|
|
23
|
+
)
|
|
22
24
|
const myDB = mongoose.connection.useDb(getDatabaseName());
|
|
23
25
|
// Create the model
|
|
24
26
|
const CommonReportModel = myDB.model("common-report", commonReportSchema);
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
const mongoose = require(
|
|
2
|
-
const { ObjectId } = mongoose.Schema.Types
|
|
3
|
-
const { getDatabaseName } = require(
|
|
1
|
+
const mongoose = require('mongoose')
|
|
2
|
+
const { ObjectId } = mongoose.Schema.Types
|
|
3
|
+
const { getDatabaseName } = require('../../constants')
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
_id: {
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
const reportSchema = new mongoose.Schema(
|
|
6
|
+
{
|
|
7
|
+
_id: {
|
|
8
|
+
type: ObjectId,
|
|
9
|
+
auto: true
|
|
10
|
+
},
|
|
11
|
+
candidateId: {
|
|
12
|
+
type: ObjectId,
|
|
13
|
+
required: true
|
|
10
14
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
jobPostId: {
|
|
16
|
+
type: ObjectId,
|
|
17
|
+
required: true
|
|
14
18
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
reportReason:{
|
|
20
|
-
type: Array,
|
|
21
|
-
default: []
|
|
19
|
+
reportReason: {
|
|
20
|
+
type: Array,
|
|
21
|
+
default: []
|
|
22
22
|
},
|
|
23
|
-
organizationId:{
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
organizationId: {
|
|
24
|
+
type: ObjectId,
|
|
25
|
+
required: true
|
|
26
26
|
}
|
|
27
|
-
}
|
|
28
|
-
|
|
27
|
+
},
|
|
28
|
+
{ timestamps: { createdAt: true, updatedAt: true } }
|
|
29
|
+
)
|
|
30
|
+
const myDB = mongoose.connection.useDb(getDatabaseName())
|
|
29
31
|
// Create the model
|
|
30
|
-
const JobReportModel = myDB.model(
|
|
32
|
+
const JobReportModel = myDB.model('job-report', reportSchema)
|
|
31
33
|
|
|
32
|
-
module.exports = JobReportModel
|
|
34
|
+
module.exports = JobReportModel
|