flykup_model_development 3.0.1 → 3.0.3

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.
@@ -191,6 +191,13 @@ const ChatMessageSchema = new mongoose.Schema({
191
191
  required: true
192
192
  },
193
193
 
194
+ source: {
195
+ type: String,
196
+ enum: ['chat', 'product', 'shoppable', 'liveVideo'],
197
+ default: 'chat'
198
+ },
199
+
200
+
194
201
  // Message content
195
202
  messageType: {
196
203
  type: String,
@@ -17,6 +17,7 @@ const notificationSchema = new mongoose.Schema(
17
17
  "return_status",
18
18
  'new_video',
19
19
  "new_product",
20
+ 'admin_broadcast'
20
21
  ],
21
22
  required: true,
22
23
  },
@@ -6,32 +6,25 @@ const paymentSchema = new mongoose.Schema({
6
6
  ref: 'Order',
7
7
  required: true
8
8
  },
9
- cfOrderId: {
10
- type: String,
11
- required: false,
12
- default: null
13
- },
14
- cfPaymentSessionId: {
15
- type: String,
16
- required: false,
17
- default: null
18
- },
19
- // Razorpay fields
20
- razorpayOrderId: {
21
- type: String,
22
- required: false,
23
- default: null
24
- },
25
- razorpayPaymentId: {
26
- type: String,
27
- required: false,
28
- default: null
29
- },
30
9
  userId: {
31
10
  type: mongoose.Schema.Types.ObjectId,
32
11
  ref: 'users',
33
12
  required: true
34
13
  },
14
+ paymentGateway: {
15
+ type: String,
16
+ enum: ['RAZORPAY', 'CASHFREE'],
17
+ required: true
18
+ },
19
+ paymentGatewayOrderId: {
20
+ type: String,
21
+ required: false
22
+ },
23
+ paymentGatewayPaymentId: {
24
+ type: String,
25
+ required: false
26
+ },
27
+
35
28
  amount: {
36
29
  type: Number,
37
30
  required: true
@@ -42,7 +35,7 @@ const paymentSchema = new mongoose.Schema({
42
35
  },
43
36
  status: {
44
37
  type: String,
45
- enum: ['PENDING', 'SUCCESS', 'FAILED',"REFUNDED"],
38
+ enum: ['PENDING', 'SUCCESS', 'FAILED', 'REFUNDED'],
46
39
  default: 'PENDING'
47
40
  },
48
41
  paymentMethod: String,
@@ -62,5 +55,6 @@ const paymentSchema = new mongoose.Schema({
62
55
  }
63
56
  }]
64
57
  }, { timestamps: true });
58
+
65
59
  const OrderPayment = mongoose.model('orderPayment', paymentSchema);
66
- export default OrderPayment;
60
+ export default OrderPayment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flykup_model_development",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "private": false,