payservedb 4.5.5 → 4.5.7

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": "4.5.5",
3
+ "version": "4.5.7",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -0,0 +1,49 @@
1
+ const mongoose = require('mongoose');
2
+
3
+ const approvalWorkflowSchema = new mongoose.Schema(
4
+ {
5
+ module: {
6
+ type: String,
7
+ required: true,
8
+ trim: true
9
+ },
10
+ facilityId: {
11
+ type: mongoose.Schema.Types.ObjectId,
12
+ ref: 'Facility',
13
+ required: true,
14
+ index: true
15
+ },
16
+
17
+ steps: {
18
+ type: [
19
+ {
20
+ stepNumber: {
21
+ type: Number,
22
+ required: true,
23
+ min: 1
24
+ },
25
+ name: {
26
+ type: String,
27
+ required: true,
28
+ trim: true
29
+ },
30
+ approvers: [
31
+ {
32
+ type: mongoose.Schema.Types.ObjectId,
33
+ ref: 'User',
34
+ required: true
35
+ }
36
+ ]
37
+ }
38
+ ],
39
+ default: []
40
+ }
41
+ },
42
+ {
43
+ timestamps: true
44
+ }
45
+ );
46
+
47
+ const ApprovalWorkflow = mongoose.model('ApprovalWorkflow', approvalWorkflowSchema);
48
+
49
+ module.exports = ApprovalWorkflow;
@@ -54,6 +54,9 @@ const CustomerSchema = new mongoose.Schema({
54
54
  required: false,
55
55
  enum: ['Active', 'Inactive']
56
56
  },
57
+ quickBooksId: {
58
+ type: String,
59
+ },
57
60
 
58
61
  familyMembers: [
59
62
  {
@@ -25,12 +25,16 @@ const supplierSchema = new mongoose.Schema({
25
25
  trim: true
26
26
  },
27
27
  contactPerson: {
28
- name: String,
29
- trim: true
28
+ name: {
29
+ type: String,
30
+ trim: true
31
+ }
30
32
  },
31
33
  department: {
32
- name: String,
33
- trim: true
34
+ name: {
35
+ type: String,
36
+ trim: true
37
+ }
34
38
  },
35
39
  taxIdentificationNumber: {
36
40
  type: String,
@@ -60,9 +64,6 @@ const supplierSchema = new mongoose.Schema({
60
64
  timestamps: true
61
65
  });
62
66
 
63
- supplierSchema.index({ name: 1, status: 1 });
64
- supplierSchema.index({ supplierType: 1 });
65
-
66
67
  const Supplier = mongoose.model('Supplier', supplierSchema);
67
68
 
68
69
  module.exports = Supplier;