@cendo/database-schemas 1.8.4 → 1.8.5

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": "@cendo/database-schemas",
3
- "version": "1.8.4",
3
+ "version": "1.8.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "keywords": [],
package/schemas/Order.js CHANGED
@@ -1,6 +1,7 @@
1
1
  const {Schema} = require('mongoose')
2
2
  const ShippingAddress = require('./types/ShippingAddress')
3
3
  const MoneyObject = require('./types/MoneyObject')
4
+ const AttachmentObject = require('./types/AttachmentObject')
4
5
 
5
6
 
6
7
  const Order = new Schema({
@@ -125,6 +126,11 @@ const Order = new Schema({
125
126
  default: {}
126
127
  },
127
128
 
129
+ attachments: {
130
+ type: [AttachmentObject],
131
+ default: []
132
+ },
133
+
128
134
  updated_at: {
129
135
  type: Date,
130
136
  default: Date.now
@@ -0,0 +1,20 @@
1
+ const {Schema} = require('mongoose')
2
+
3
+
4
+ const AttachmentObject = new Schema({
5
+ _id: false,
6
+
7
+ type: {
8
+ type: String,
9
+ trim: true,
10
+ required: true,
11
+ enum: ['image'],
12
+ },
13
+
14
+ url: {
15
+ type: String,
16
+ trim: true,
17
+ },
18
+ })
19
+
20
+ module.exports = AttachmentObject