payservedb 6.4.9 → 6.5.0

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": "6.4.9",
3
+ "version": "6.5.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -19,6 +19,25 @@ const inspection_certificate = new mongoose.Schema(
19
19
  { _id: false },
20
20
  );
21
21
 
22
+ const documents = new mongoose.Schema(
23
+ {
24
+ name: {
25
+ type: String,
26
+ required: true,
27
+ },
28
+ type: {
29
+ type: String,
30
+ enum: ["PDF", "Image", "Video"],
31
+ required: true,
32
+ },
33
+ url: {
34
+ type: String,
35
+ required: true,
36
+ },
37
+ },
38
+ { _id: false },
39
+ );
40
+
22
41
  const assetSchema = new mongoose.Schema(
23
42
  {
24
43
  facilityId: {
@@ -40,6 +59,12 @@ const assetSchema = new mongoose.Schema(
40
59
  required: true,
41
60
  },
42
61
  ],
62
+ documents: [
63
+ {
64
+ type: documents,
65
+ required: true,
66
+ },
67
+ ],
43
68
  serialNumber: {
44
69
  type: String,
45
70
  unique: true,