payservedb 3.3.1 → 3.3.3

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": "3.3.1",
3
+ "version": "3.3.3",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,27 @@
1
+ const mongoose = require('mongoose');
2
+
3
+ const InvoiceSettingsSchema = new mongoose.Schema({
4
+ facilityId: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: 'Facility',
7
+ required: [true, 'Facility ID is required']
8
+ },
9
+ termsAndConditions: {
10
+ type: String,
11
+ default: 'Payment is due within 15 days'
12
+ },
13
+ bankName: {
14
+ type: String,
15
+ required: [true, 'Bank name is required']
16
+ },
17
+ accountNumber: {
18
+ type: String,
19
+ required: [true, 'Account number is required']
20
+ }
21
+ }, {
22
+ timestamps: true
23
+ });
24
+
25
+ const InvoiceSettings = mongoose.model('InvoiceSettings', InvoiceSettingsSchema);
26
+
27
+ module.exports = InvoiceSettings;
@@ -14,7 +14,6 @@ const serviceVendorSchema = new mongoose.Schema({
14
14
  },
15
15
  dates: {
16
16
  type: [Date],
17
- required: true,
18
17
  },
19
18
  assignedAssets: [{
20
19
  type: mongoose.Schema.Types.ObjectId,