@positivegrid/pg-mongoose-schema 26.4.0 → 26.6.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/models/hardware.js +1 -0
- package/models/payment.js +1 -1
- package/models/pgConfig.js +3 -1
- package/package.json +1 -1
package/models/hardware.js
CHANGED
|
@@ -11,6 +11,7 @@ module.exports = function (mongoose) {
|
|
|
11
11
|
hw_sn: { type: String, required: true },
|
|
12
12
|
channel: { type: String, default: null }, // Hardware sales channel: amazon
|
|
13
13
|
status: { type: 'Number', default: 1 }, //1:normal/2:deactived/3:blacklist
|
|
14
|
+
metadata: { type: Schema.Types.Mixed },
|
|
14
15
|
created_on: { type: Date, default: Date.now }
|
|
15
16
|
}, { collection: 'hardware_seriesnumber' })
|
|
16
17
|
|
package/models/payment.js
CHANGED
|
@@ -305,7 +305,7 @@ module.exports = function (mongoose) {
|
|
|
305
305
|
|
|
306
306
|
const GuestCheckoutSchema = new Schema({
|
|
307
307
|
email: { type: String, required: true },
|
|
308
|
-
status: { type: Number, default: 1, required: true }, // 1:Wait for Binding/2: Bind to target account/3: Error
|
|
308
|
+
status: { type: Number, default: 1, required: true }, // 1:Wait for Binding/2: Bind to target account/3: Error/4: Refund
|
|
309
309
|
bc_order_id: { type: Number, default: null },
|
|
310
310
|
user_id: { type: ObjectId, ref: 'User', default: null },
|
|
311
311
|
purchased_items: [{
|
package/models/pgConfig.js
CHANGED
|
@@ -24,9 +24,11 @@ module.exports = function (mongoose) {
|
|
|
24
24
|
const KeyValueSchema = new Schema({
|
|
25
25
|
key: { type: String, required: true },
|
|
26
26
|
value: { type: Schema.Types.Mixed, required: true },
|
|
27
|
-
created_on: { type: Date, default: Date.now }
|
|
27
|
+
created_on: { type: Date, default: Date.now },
|
|
28
|
+
expire_at: { type: Date, default: null }
|
|
28
29
|
}, { collection: 'pg_key_value' })
|
|
29
30
|
KeyValueSchema.index({ key: 1 })
|
|
31
|
+
KeyValueSchema.index({ expire_at: 1 }, { expireAfterSeconds: 0 })
|
|
30
32
|
|
|
31
33
|
const CrashDataSchema = new Schema({
|
|
32
34
|
product: { type: String, required: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@positivegrid/pg-mongoose-schema",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.6.0",
|
|
4
4
|
"description": "Positive Grid mongoose schema",
|
|
5
5
|
"author": "Ferrari Lee <shiyung@positivegrid.com>",
|
|
6
6
|
"homepage": "https://git.positivegrid.com:8443/backend/pg-mongoose-schema",
|