jp-shared 1.0.16 → 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.
|
@@ -94,6 +94,10 @@ const paymentHistorySchema = new mongoose.Schema(
|
|
|
94
94
|
type: Boolean,
|
|
95
95
|
required: [true, "Job offer status is required"],
|
|
96
96
|
},
|
|
97
|
+
isVerified: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
required: [true, "isVerified is required"]
|
|
100
|
+
},
|
|
97
101
|
jobOfferDiscountPercentage: {
|
|
98
102
|
type: Number,
|
|
99
103
|
required: function () {
|
|
@@ -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
|
|
@@ -34,12 +34,6 @@ const schema = new mongoose.Schema(
|
|
|
34
34
|
type: ObjectId,
|
|
35
35
|
required: [true, "paymentHistoryId is required"],
|
|
36
36
|
},
|
|
37
|
-
jobId: {
|
|
38
|
-
type: String,
|
|
39
|
-
unique: true,
|
|
40
|
-
required: [true, "Job ID is required"],
|
|
41
|
-
},
|
|
42
|
-
|
|
43
37
|
},
|
|
44
38
|
{
|
|
45
39
|
timestamps: { createdAt: true, updatedAt: true },
|