jp-shared 1.0.13 → 1.0.15

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.
@@ -0,0 +1,26 @@
1
+ const mongoose = require("mongoose");
2
+ const { ObjectId } = mongoose.Schema.Types;
3
+ const { getDatabaseName } = require("../../constants");
4
+
5
+
6
+ const commonReportSchema = new mongoose.Schema({
7
+ _id: {
8
+ type: ObjectId,
9
+ auto:true
10
+ },
11
+ userId: {
12
+ type: ObjectId,
13
+ required: true
14
+ },
15
+ issueImage: {
16
+ type: String
17
+ },
18
+ issue:{
19
+ type: String
20
+ }
21
+ })
22
+ const myDB = mongoose.connection.useDb(getDatabaseName());
23
+ // Create the model
24
+ const CommonReportModel = myDB.model("common-report", commonReportSchema);
25
+
26
+ module.exports = CommonReportModel;
@@ -1,3 +1,5 @@
1
+ const CommonReportModel = require("./commonReport-model");
2
+
1
3
  module.exports = {
2
4
  ActiveJobPostModel: require("./active-model"),
3
5
  DraftJobPostModel: require("./draft-model"),
@@ -8,4 +10,5 @@ module.exports = {
8
10
  RejectedJobPostModel: require("./rejected-model"),
9
11
  JobReportModel: require("./reportJob-model"),
10
12
  VerificationJobPostModel: require("./verification-model"),
13
+ CommonReportModel: require("./commonReport-model")
11
14
  };
@@ -19,6 +19,10 @@ const reportSchema = new mongoose.Schema({
19
19
  reportReason:{
20
20
  type: Array,
21
21
  default: []
22
+ },
23
+ organizationId:{
24
+ type: ObjectId,
25
+ required: true
22
26
  }
23
27
  })
24
28
  const myDB = mongoose.connection.useDb(getDatabaseName());
@@ -10,4 +10,4 @@ const counterSchema = new mongoose.Schema({
10
10
  const myDB = mongoose.connection.useDb(getDatabaseName());
11
11
  const CounterModel = myDB.model("counter", counterSchema);
12
12
 
13
- module.exports = { CounterModel };
13
+ module.exports = CounterModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp-shared",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -24,8 +24,5 @@
24
24
  "puppeteer-core": "^10.4.0",
25
25
  "to-words": "^4.2.0",
26
26
  "validator": "^13.12.0"
27
- },
28
- "dependencies": {
29
- "jp-shared": "file:"
30
27
  }
31
28
  }