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("mongoose");
2
- const { ObjectId } = mongoose.Schema.Types;
3
- const { getDatabaseName } = require("../../constants");
1
+ const mongoose = require('mongoose')
2
+ const { ObjectId } = mongoose.Schema.Types
3
+ const { getDatabaseName } = require('../../constants')
4
4
 
5
-
6
- const reportSchema = new mongoose.Schema({
7
- _id: {
8
- type: ObjectId,
9
- auto:true
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
- candidateId: {
12
- type: ObjectId,
13
- required: true
15
+ jobPostId: {
16
+ type: ObjectId,
17
+ required: true
14
18
  },
15
- jobPostId: {
16
- type: ObjectId,
17
- required: true
18
- },
19
- reportReason:{
20
- type: Array,
21
- default: []
19
+ reportReason: {
20
+ type: Array,
21
+ default: []
22
22
  },
23
- organizationId:{
24
- type: ObjectId,
25
- required: true
23
+ organizationId: {
24
+ type: ObjectId,
25
+ required: true
26
26
  }
27
- })
28
- const myDB = mongoose.connection.useDb(getDatabaseName());
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("job-report", reportSchema);
32
+ const JobReportModel = myDB.model('job-report', reportSchema)
31
33
 
32
- module.exports = JobReportModel;
34
+ module.exports = JobReportModel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp-shared",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"