jp-shared 1.0.7 → 1.0.9

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.
@@ -2,21 +2,9 @@ const mongoose = require('mongoose');
2
2
  const { getDatabaseName } = require("../../constants");
3
3
 
4
4
  const collegeSchema = new mongoose.Schema({
5
- universityName: {
6
- type: String,
7
- required: true
8
- },
9
5
  collegeName: {
10
6
  type: String,
11
7
  required: true
12
- },
13
- stateName: {
14
- type: String,
15
- required: true
16
- },
17
- districtName: {
18
- type: String,
19
- required: true
20
8
  }
21
9
  }, { timestamps: false });
22
10
 
@@ -6,5 +6,6 @@ module.exports = {
6
6
  OnHoldJobPostModel: require("./onHold-model"),
7
7
  PendingJobPostModel: require("./pending-model"),
8
8
  RejectedJobPostModel: require("./rejected-model"),
9
+ JobReportModel: require("./reportJob-model"),
9
10
  VerificationJobPostModel: require("./verification-model"),
10
11
  };
@@ -0,0 +1,28 @@
1
+ const mongoose = require("mongoose");
2
+ const { ObjectId } = mongoose.Schema.Types;
3
+ const { getDatabaseName } = require("../../constants");
4
+
5
+
6
+ const reportSchema = new mongoose.Schema({
7
+ _id: {
8
+ type: ObjectId,
9
+ auto:true
10
+ },
11
+ candidateId: {
12
+ type: ObjectId,
13
+ required: true
14
+ },
15
+ jobPostId: {
16
+ type: ObjectId,
17
+ required: true
18
+ },
19
+ reportReason:{
20
+ type: Array,
21
+ default: []
22
+ }
23
+ })
24
+ const myDB = mongoose.connection.useDb(getDatabaseName());
25
+ // Create the model
26
+ const JobReportModel = myDB.model("job-report", reportSchema);
27
+
28
+ module.exports = JobReportModel;
package/package.json CHANGED
@@ -1,28 +1,31 @@
1
- {
2
- "name": "jp-shared",
3
- "version": "1.0.7",
4
- "main": "index.js",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1"
7
- },
8
- "keywords": [],
9
- "author": "",
10
- "license": "ISC",
11
- "description": "",
12
- "peerDependencies": {
13
- "axios": "^1.8.1",
14
- "bcrypt": "^5.1.1",
15
- "dotenv": "^16.4.7",
16
- "express-validator": "^7.2.1",
17
- "firebase-admin": "^13.2.0",
18
- "jsonwebtoken": "^9.0.2",
19
- "moment": "^2.30.1",
20
- "mongoose": "^8.12.1",
21
- "nodemailer": "^6.10.0",
22
- "puppeteer": "^23.11.0",
23
- "puppeteer-core": "^10.4.0",
24
- "chrome-aws-lambda": "^10.1.0",
25
- "validator": "^13.12.0",
26
- "to-words": "^4.2.0"
27
- }
28
- }
1
+ {
2
+ "name": "jp-shared",
3
+ "version": "1.0.9",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1"
7
+ },
8
+ "keywords": [],
9
+ "author": "",
10
+ "license": "ISC",
11
+ "description": "",
12
+ "peerDependencies": {
13
+ "axios": "^1.8.1",
14
+ "bcrypt": "^5.1.1",
15
+ "chrome-aws-lambda": "^10.1.0",
16
+ "dotenv": "^16.4.7",
17
+ "express-validator": "^7.2.1",
18
+ "firebase-admin": "^13.2.0",
19
+ "jsonwebtoken": "^9.0.2",
20
+ "moment": "^2.30.1",
21
+ "mongoose": "^8.12.1",
22
+ "nodemailer": "^6.10.0",
23
+ "puppeteer": "^23.11.0",
24
+ "puppeteer-core": "^10.4.0",
25
+ "to-words": "^4.2.0",
26
+ "validator": "^13.12.0"
27
+ },
28
+ "dependencies": {
29
+ "jp-shared": "file:"
30
+ }
31
+ }