jp-shared 1.0.1 → 1.0.2

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,18 @@
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: [{ type: String, required: true }],
9
+ },
10
+ { timestamps: false }
11
+ );
12
+
13
+ const myDB = mongoose.connection.useDb(getDatabaseName());
14
+
15
+ // Create the model
16
+ const BoardModel = myDB.model("board", schema);
17
+
18
+ module.exports = BoardModel;
@@ -0,0 +1,28 @@
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 College = mongoose.model('college', collegeSchema);
28
+ module.exports = College;
@@ -1,4 +1,6 @@
1
1
  module.exports = {
2
+ BoardModel: require("./board-model"),
3
+ CollegeModel: require("./college-model"),
2
4
  EducationModel: require("./education-model"),
3
5
  CourseModel: require("./course-model"),
4
6
  JobApplicationModel: require("./jobApplication-model"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jp-shared",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"