flykup_model_development 2.0.9 → 3.0.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/index.js CHANGED
@@ -32,7 +32,7 @@ import ShoppableVideoInteraction from './models/ShoppableInteraction.model.js';
32
32
  import SellerDraft from './models/sellerDraft.model.js';
33
33
  import AadhaarVerification from './models/AadhaarVerification.js';
34
34
  import BankVerification from './models/BankVerification.js';
35
- import GSTVerification from './models/GSTVerification.js'
35
+ import GSTVerification from './models/GSTVerification.js';
36
36
  let initialized = false;
37
37
 
38
38
  export async function initializeSharedModels({ token, dbUri }) {
@@ -134,6 +134,4 @@ export {
134
134
  AadhaarVerificationModel as AadhaarVerification,
135
135
  BankVerificationModel as BankVerification,
136
136
  GSTVerificationModel as GSTVerification
137
-
138
-
139
137
  };
@@ -1,5 +1,5 @@
1
1
  // order.modal.js
2
- import mongoose, { Schema, model } from 'mongoose';
2
+ import mongoose from 'mongoose';
3
3
  import { nanoid } from 'nanoid';
4
4
 
5
5
  const orderSchema = new mongoose.Schema(
@@ -48,17 +48,6 @@ const orderSchema = new mongoose.Schema(
48
48
  type: String,
49
49
  enum: ['CGST+SGST', 'IGST',"NON-GST"],
50
50
  required: true
51
- },
52
- isFlashSale: {
53
- type: Boolean,
54
- default: false
55
- },
56
- flashSaleId: {
57
- type: mongoose.Schema.Types.ObjectId,
58
- ref: 'FlashSale'
59
- },
60
- flashPrice: {
61
- type: Number
62
51
  }
63
52
  }],
64
53
  totalBaseAmount: {
@@ -147,7 +136,7 @@ const orderSchema = new mongoose.Schema(
147
136
  }],
148
137
  paymentMethod: {
149
138
  type: String,
150
- enum: ['CARD', 'UPI', 'NETBANKING', 'WALLET', 'COD', "PENDING_PAYMENT", "CASHFREE", "Online"],
139
+ enum: ['CARD', 'UPI', 'NETBANKING', 'WALLET', 'COD', "PENDING_PAYMENT", "CASHFREE","RAZORPAY", "Online"],
151
140
  required: true
152
141
  },
153
142
  paymentStatus: {
@@ -177,9 +166,9 @@ const orderSchema = new mongoose.Schema(
177
166
  // default: 'ORDERED', // Default should be the initial state
178
167
  required: true
179
168
  },
180
- sourceType: {
169
+ sourceType: {
181
170
  type: String,
182
- enum: ['static', 'shoppable_video', 'livestream', 'auction', 'flash_sale'], // Add flash_sale
171
+ enum: ['static', 'shoppable_video', 'livestream', 'auction'],
183
172
  required: true
184
173
  },
185
174
  sourceRefId: String,
@@ -288,6 +277,9 @@ payment: {
288
277
  );
289
278
 
290
279
 
291
-
292
- const Order = mongoose.models.Order || mongoose.model('Order', orderSchema);
280
+ const Order = mongoose.model('Order', orderSchema);
293
281
  export default Order;
282
+
283
+
284
+ // const Order = mongoose.models.Order || mongoose.model('Order', orderSchema);
285
+ // export default Order;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flykup_model_development",
3
- "version": "2.0.9",
3
+ "version": "3.0.0",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "private": false,
@@ -11,6 +11,7 @@
11
11
  "bcrypt": "^5.1.0",
12
12
  "crypto": "^1.0.1",
13
13
  "dotenv": "^16.4.5",
14
+ "flykup_model_development": "^2.0.9",
14
15
  "jsonwebtoken": "^9.0.0",
15
16
  "mongoose": "^8.0.0",
16
17
  "nanoid": "^5.1.5"