jp-shared 1.0.1 → 1.0.3
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.
|
@@ -15,6 +15,6 @@ const myDB = mongoose.connection.useDb("OA_Job_Portal_API");
|
|
|
15
15
|
|
|
16
16
|
schema.index({ candidateId: 1, sessionId: 1 });
|
|
17
17
|
|
|
18
|
-
const CandidateToken = myDB.model(getDatabaseName, schema);
|
|
18
|
+
const CandidateToken = myDB.model(getDatabaseName(), schema);
|
|
19
19
|
|
|
20
20
|
module.exports = CandidateToken;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const mongoose = require("mongoose");
|
|
2
|
+
const { getDatabaseName } = require("../../constants");
|
|
3
|
+
|
|
4
|
+
// Define the schema
|
|
5
|
+
const schema = new mongoose.Schema(
|
|
6
|
+
{
|
|
7
|
+
state: { type: String, required: true },
|
|
8
|
+
boards: [
|
|
9
|
+
{
|
|
10
|
+
label: { type: String, required: true },
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
{ timestamps: false }
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
const myDB = mongoose.connection.useDb(getDatabaseName());
|
|
18
|
+
|
|
19
|
+
// Create the model
|
|
20
|
+
const BoardModel = myDB.model("board", schema);
|
|
21
|
+
|
|
22
|
+
module.exports = BoardModel;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const collegeSchema = new mongoose.Schema({
|
|
4
|
+
universityName: {
|
|
5
|
+
type: String,
|
|
6
|
+
required: true
|
|
7
|
+
},
|
|
8
|
+
collegeName: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: true
|
|
11
|
+
},
|
|
12
|
+
// collegeType: {
|
|
13
|
+
// type: String,
|
|
14
|
+
// enum: ['Affiliated College', 'Constituent / University College', 'PG Center / Off-Campus Center', 'Recognized Center'],
|
|
15
|
+
// required: true
|
|
16
|
+
// },
|
|
17
|
+
stateName: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
districtName: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true
|
|
24
|
+
}
|
|
25
|
+
}, { timestamps: false });
|
|
26
|
+
|
|
27
|
+
const myDB = mongoose.connection.useDb(getDatabaseName());
|
|
28
|
+
|
|
29
|
+
const College = myDB.model('college', collegeSchema);
|
|
30
|
+
|
|
31
|
+
module.exports = College;
|