flykup_model_development 3.1.13 → 3.1.15
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.
|
@@ -69,6 +69,15 @@ const liveStreamInteractionSchema = new mongoose.Schema({
|
|
|
69
69
|
type: mongoose.Schema.Types.ObjectId,
|
|
70
70
|
ref: 'productlistings'
|
|
71
71
|
}],
|
|
72
|
+
auctionBids: [{
|
|
73
|
+
productId: { type: mongoose.Schema.Types.ObjectId, ref: 'productlistings' },
|
|
74
|
+
bidAmount: { type: Number, required: true },
|
|
75
|
+
bidTime: { type: Date, default: Date.now }
|
|
76
|
+
}],
|
|
77
|
+
giveawayEntries: [{
|
|
78
|
+
productId: { type: mongoose.Schema.Types.ObjectId, ref: 'productlistings' },
|
|
79
|
+
entryTime: { type: Date, default: Date.now }
|
|
80
|
+
}]
|
|
72
81
|
}, {
|
|
73
82
|
timestamps: true
|
|
74
83
|
});
|
package/models/order.modal.js
CHANGED
|
@@ -8,7 +8,7 @@ const orderSchema = new mongoose.Schema(
|
|
|
8
8
|
type: String,
|
|
9
9
|
required: true,
|
|
10
10
|
unique: true,
|
|
11
|
-
default: () => `ORD-${nanoid(8)}`
|
|
11
|
+
default: () => `FLY-ORD-${nanoid(8)}`
|
|
12
12
|
},
|
|
13
13
|
userId: {
|
|
14
14
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -182,7 +182,6 @@ const orderSchema = new mongoose.Schema(
|
|
|
182
182
|
sourceRefId: String,
|
|
183
183
|
deliveryCharge: {
|
|
184
184
|
type: Number,
|
|
185
|
-
default: 40
|
|
186
185
|
},
|
|
187
186
|
statusTimeline: {
|
|
188
187
|
ordered: Date,
|
|
@@ -21,7 +21,11 @@ const ProductListingSchema = new Schema(
|
|
|
21
21
|
endsAt: { type: Date, default: null },
|
|
22
22
|
startsAt: { type: Date, default: null }
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
sku: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
index: true
|
|
28
|
+
},
|
|
25
29
|
images: [
|
|
26
30
|
{
|
|
27
31
|
key: { type: String, maxLength: 255, default: null },
|