payservedb 8.7.3 → 8.7.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": "8.7.3",
3
+ "version": "8.7.4",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -2,38 +2,38 @@ const mongoose = require('mongoose');
2
2
 
3
3
  // Define the schema for VasVendor
4
4
  const vasVendorSchema = new mongoose.Schema({
5
+
5
6
  facilityId: {
6
7
  type: mongoose.Schema.Types.ObjectId,
7
8
  ref: 'Facility',
8
- required: true,
9
+ required: true
9
10
  },
11
+
10
12
  name: {
11
13
  type: String,
12
14
  required: true,
13
15
  trim: true
14
16
  },
15
- location: {
16
- type: String,
17
- required: true,
18
- trim: true
19
- },
20
- jobDescription: {
17
+
18
+ address: {
21
19
  type: String,
22
- required: true,
23
20
  trim: true
24
21
  },
25
- offers: [{
26
- serviceId: {
27
- type: mongoose.Schema.Types.ObjectId,
28
- ref: 'Service', // Reference to the Service model
29
- required: true
30
- },
31
- amount: {
32
- type: Number,
33
- required: true,
34
- min: [0, 'Amount must be a positive number']
22
+
23
+ offers: [
24
+ {
25
+ serviceId: {
26
+ type: mongoose.Schema.Types.ObjectId,
27
+ ref: 'ValueAddedService',
28
+ required: true
29
+ },
30
+ amount: {
31
+ type: Number,
32
+ min: 0
33
+ }
35
34
  }
36
- }],
35
+ ],
36
+
37
37
  contactDetails: {
38
38
  name: {
39
39
  type: String,
@@ -45,12 +45,20 @@ const vasVendorSchema = new mongoose.Schema({
45
45
  },
46
46
  email: {
47
47
  type: String,
48
- required: true,
49
- match: [/.+\@.+\..+/, 'Please provide a valid email address']
48
+ match: [/.+\@.+\..+/, 'Please provide a valid email']
50
49
  }
51
- }
50
+ },
51
+
52
+ status: {
53
+ type: String,
54
+ enum: ["ACTIVE", "INACTIVE"],
55
+ default: "ACTIVE"
56
+ },
57
+
58
+ notes: String
59
+
52
60
  }, {
53
- timestamps: true // This will automatically add createdAt and updatedAt fields
61
+ timestamps: true
54
62
  });
55
63
 
56
64
  const VasVendor = mongoose.model('VasVendor', vasVendorSchema);