payservedb 2.8.3 → 2.8.4

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
@@ -105,8 +105,8 @@ const models = {
105
105
  ValueAddedService:require('./src/models/valueaddedservices'),
106
106
  VasInvoice:require('./src/models/vasinvoice'),
107
107
  VasVendor:require('./src/models/vasvendor'),
108
- Employees:require('./src/models/employees'),
109
- ServiceRequest:require('./src/models/servicerequest'),
108
+ Staff:require('./src/models/staff'),
109
+ ServiceRequest:require('./src/models/servicerequest')
110
110
 
111
111
 
112
112
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "2.8.3",
3
+ "version": "2.8.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,36 @@
1
+ const mongoose = require("mongoose");
2
+
3
+ // Define the Staff schema
4
+ const staffSchema = new mongoose.Schema(
5
+ {
6
+ facilityId: {
7
+ type: mongoose.Schema.Types.ObjectId,
8
+ ref: 'Facility',
9
+ required: true,
10
+ },
11
+ name: {
12
+ type: String,
13
+ required: true,
14
+ },
15
+ contact: {
16
+ type: String,
17
+ required: true,
18
+ },
19
+ phoneNumber: {
20
+ type: String,
21
+ required: true,
22
+ },
23
+ service: [{
24
+ type: mongoose.Schema.Types.ObjectId,
25
+ ref: 'ValueAddedService',
26
+ required: true,
27
+ }],
28
+ },
29
+ {
30
+ timestamps: true,
31
+ }
32
+ );
33
+
34
+ const Staff = mongoose.model('Staff', staffSchema);
35
+
36
+ module.exports = { Staff };
@@ -1,34 +0,0 @@
1
- const mongoose = require("mongoose");
2
-
3
- // Define the Employee schema
4
- const employeeSchema = new mongoose.Schema(
5
- {
6
- facilityId: {
7
- type: mongoose.Schema.Types.ObjectId,
8
- ref: 'Facility',
9
- required: true,
10
- },
11
- name: {
12
- type: String,
13
- required: true,
14
- },
15
- contact: {
16
- type: String,
17
- required: true,
18
- },
19
- phoneNumber: {
20
- type: String,
21
- required: true,
22
- },
23
- service: [{
24
- type: mongoose.Schema.Types.ObjectId,
25
- ref: 'ValueAddedService',
26
- required: true,
27
- }],
28
- }, {
29
- timestamps: true,
30
- });
31
-
32
- const Employees = mongoose.model('Employees', employeeSchema);
33
-
34
- module.exports = { Employees };