payservedb 1.1.7 → 1.1.9

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.1.7",
3
+ "version": "1.1.9",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -1,6 +1,10 @@
1
1
  const mongoose = require('mongoose');
2
2
 
3
- const VisitorSchema = new mongoose.Schema({
3
+ const CustomerSchema = new mongoose.Schema({
4
+ customerNumber: {
5
+ type: Number,
6
+ required: true
7
+ },
4
8
  firstName: {
5
9
  type: String,
6
10
  required: true,
@@ -17,6 +21,39 @@ const VisitorSchema = new mongoose.Schema({
17
21
  type: String,
18
22
  required: true,
19
23
  },
24
+ email: {
25
+ type: String,
26
+ required: true
27
+ },
28
+ nextOfKinName:{
29
+ type:String,
30
+ required:true
31
+ },
32
+ nextOfKinRelationship:{
33
+ type:String,
34
+ required:true
35
+ },
36
+ nextOfKinContact:{
37
+ type:String,
38
+ required:true
39
+ },
40
+ customerType:{
41
+ type:String,
42
+ required:true
43
+ },
44
+ residentType:{
45
+ type:String,
46
+ required:true
47
+ },
48
+ facilityId: {
49
+ type: mongoose.Schema.Types.ObjectId,
50
+ ref: 'Facility'
51
+ },
52
+ status:{
53
+ type:String,
54
+ required:true,
55
+ enum:['Active','Inactive']
56
+ },
20
57
 
21
58
  familyMembers: [
22
59
  {
@@ -72,6 +109,6 @@ const VisitorSchema = new mongoose.Schema({
72
109
  ],
73
110
  });
74
111
 
75
- const Visitor = mongoose.model('Visitor', VisitorSchema);
112
+ const Customer = mongoose.model('Customer', CustomerSchema);
76
113
 
77
- module.exports = Visitor;
114
+ module.exports = Customer;
@@ -41,6 +41,15 @@ const unitSchema = new mongoose.Schema({
41
41
  facilityId:{
42
42
  type: mongoose.Schema.Types.ObjectId,
43
43
  ref: 'Facility',
44
+ },
45
+
46
+ homeOwnerId:{
47
+ type: mongoose.Schema.Types.ObjectId,
48
+ ref: 'Customer',
49
+ },
50
+ tenantId:{
51
+ type: mongoose.Schema.Types.ObjectId,
52
+ ref: 'Customer',
44
53
  }
45
54
 
46
55