payservedb 8.2.5 → 8.2.6

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.
package/index.js CHANGED
@@ -232,7 +232,8 @@ const models = {
232
232
  InspectionCategory: require("./src/models/inspection_category"),
233
233
  AgentRole: require("./src/models/agent_roles"),
234
234
  CustomerSatisfactionSurvey: require("./src/models/customer_satisfaction_survey"),
235
- AgentDepartment: require("./src/models/agent_departments")
235
+ AgentDepartment: require("./src/models/agent_departments"),
236
+ DocumentType: require("./src/models/document_type")
236
237
  };
237
238
 
238
239
  // Function to get models dynamically from a specific database connection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "8.2.5",
3
+ "version": "8.2.6",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,20 @@
1
+ const mongoose = require('mongoose');
2
+
3
+ const documentTypeSchema = new mongoose.Schema({
4
+ facilityId: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: 'Facility',
7
+ },
8
+ name: {
9
+ type: String,
10
+ required: true,
11
+ unique: true,
12
+ trim: true,
13
+ },
14
+ }, {
15
+ timestamps: true,
16
+ });
17
+
18
+ const DocumentType = mongoose.model('DocumentType', documentTypeSchema);
19
+
20
+ module.exports = DocumentType;