payservedb 6.1.4 → 6.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "6.1.4",
3
+ "version": "6.1.6",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,40 +1,9 @@
1
1
  const mongoose = require('mongoose');
2
2
 
3
3
  const powerMeterCustomerBandSchema = new mongoose.Schema({
4
- facilityId: {
5
- type: mongoose.Schema.Types.ObjectId,
6
- ref: 'Facility',
7
- required: true
8
- },
9
- meterSerialNumber: {
10
- type: String,
11
- required: true
12
- },
13
- deviceId: {
14
- type: Number,
15
- required: false
16
- },
17
- gatewayId: {
18
- type: String,
19
- required: true
20
- },
21
- meterReading: {
22
- type: Number,
23
- required: true
24
- },
25
- lastUpdated: {
26
- type: Date,
27
- required: true
28
- },
29
- manufacturer: {
4
+ name: {
30
5
  type: String,
31
6
  required: true
32
- },
33
- type: {
34
- type: String,
35
- required: true,
36
- enum: ['2 phase', '3 phase'],
37
- default: '2 phase'
38
7
  }
39
8
  }, {
40
9
  timestamps: true
@@ -22,11 +22,11 @@ const userSchema = new mongoose.Schema({
22
22
  type: String,
23
23
  required: false
24
24
  },
25
- type: {
25
+ type: [{
26
26
  type: String,
27
27
  required: [true, 'Type is required'],
28
28
  enum: ['Company', 'Project Manager', 'Universal', 'Core', 'Resident', 'Landlord', 'Supplier'],
29
- },
29
+ }],
30
30
  department: {
31
31
  type: mongoose.Schema.Types.ObjectId,
32
32
  ref: 'FacilityDepartment',