payservedb 1.4.2 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payservedb",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -28,7 +28,8 @@ const contractSchema = new mongoose.Schema({
28
28
  required: true
29
29
  },
30
30
  },
31
- { timestamps: true });
31
+ // { timestamps: true }
32
+ );
32
33
 
33
34
  contractSchema.index({ contractName: 1 });
34
35
 
@@ -6,6 +6,10 @@ const LevySchema = new mongoose.Schema({
6
6
  required: [true, 'Levy name is required'],
7
7
  trim: true,
8
8
  },
9
+ amount: {
10
+ type:Number,
11
+ required: [true, 'amount is required'],
12
+ },
9
13
  levyType: {
10
14
  type: String,
11
15
  required: [true, 'Levy type is required'],
@@ -27,6 +27,10 @@ const visitorSchema = new mongoose.Schema({
27
27
  required: true,
28
28
  enum: ["Staff", "Delivery", "Other"]
29
29
  },
30
+ residentId: {
31
+ type: mongoose.Schema.Types.ObjectId,
32
+ ref: 'Customer',
33
+ },
30
34
  facilityId: {
31
35
  type: mongoose.Schema.Types.ObjectId,
32
36
  ref: 'Facility',
@@ -1,14 +1,18 @@
1
1
  const mongoose = require('mongoose');
2
2
 
3
3
  const waterMeterSettingsSchema = mongoose.Schema({
4
- manufacturers: {
5
- type: [String],
6
- required: false
7
- },
8
- meterSizes: {
9
- type: [String],
10
- required: false
11
- }
4
+ meterSettings: [
5
+ {
6
+ manufacturers: {
7
+ type: [String],
8
+ required: false
9
+ },
10
+ meterSizes: {
11
+ type: [String],
12
+ required: false
13
+ },
14
+ }
15
+ ]
12
16
  });
13
17
 
14
18
  // Middleware to ensure only one record exists