payservedb 7.0.2 → 7.0.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,5 +1,5 @@
|
|
|
1
1
|
const mongoose = require("mongoose");
|
|
2
|
-
const {
|
|
2
|
+
const {RecipientSchema} = require("./facilityInvoiceRecipient")
|
|
3
3
|
|
|
4
4
|
const FacilityInvoiceSchema = new mongoose.Schema(
|
|
5
5
|
{
|
|
@@ -14,7 +14,7 @@ const FacilityInvoiceSchema = new mongoose.Schema(
|
|
|
14
14
|
required: true,
|
|
15
15
|
},
|
|
16
16
|
recipient: {
|
|
17
|
-
type:
|
|
17
|
+
type: RecipientSchema,
|
|
18
18
|
required: true,
|
|
19
19
|
},
|
|
20
20
|
invoiceNumber: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const mongoose = require("mongoose");
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const RecipientSchema = new mongoose.Schema(
|
|
4
4
|
{
|
|
5
5
|
facilityId: {
|
|
6
6
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -25,7 +25,12 @@ const Recipient = new mongoose.Schema(
|
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
const Recipient = mongoose.model("Recipient", RecipientSchema);
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
module.exports = Recipient
|
|
32
|
+
|
|
28
33
|
|
|
29
34
|
module.exports = {
|
|
30
|
-
|
|
31
|
-
}
|
|
35
|
+
RecipientSchema
|
|
36
|
+
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
const mongoose = require("mongoose");
|
|
2
|
-
|
|
3
|
-
const Recipient = new mongoose.Schema(
|
|
4
|
-
{
|
|
5
|
-
facilityId: {
|
|
6
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
7
|
-
ref: "Facility",
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
phoneNumber: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: true
|
|
13
|
-
},
|
|
14
|
-
email: {
|
|
15
|
-
type: String,
|
|
16
|
-
required: true,
|
|
17
|
-
lowercase: true,
|
|
18
|
-
trim: true,
|
|
19
|
-
match: [/^\S+@\S+\.\S+$/, "Please enter a valid email address"]
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
timestamps: true,
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const RecipientSchema = mongoose.model("RecipientSchema", Recipient);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
module.exports = {
|
|
32
|
-
RecipientSchema,
|
|
33
|
-
};
|