flykup_model_development 3.0.0 → 3.0.2

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,
@@ -0,0 +1,60 @@
1
+ import mongoose from 'mongoose';
2
+
3
+ const paymentSchema = new mongoose.Schema({
4
+ orderId: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: 'Order',
7
+ required: true
8
+ },
9
+ userId: {
10
+ type: mongoose.Schema.Types.ObjectId,
11
+ ref: 'users',
12
+ required: true
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
+
28
+ amount: {
29
+ type: Number,
30
+ required: true
31
+ },
32
+ currency: {
33
+ type: String,
34
+ default: 'INR'
35
+ },
36
+ status: {
37
+ type: String,
38
+ enum: ['PENDING', 'SUCCESS', 'FAILED', 'REFUNDED'],
39
+ default: 'PENDING'
40
+ },
41
+ paymentMethod: String,
42
+ transactionId: String,
43
+ transactionTime: Date,
44
+ sellerPayments: [{
45
+ sellerId: {
46
+ type: mongoose.Schema.Types.ObjectId,
47
+ ref: 'users',
48
+ required: true
49
+ },
50
+ amount: Number,
51
+ settlementStatus: {
52
+ type: String,
53
+ enum: ['PENDING', 'SETTLED'],
54
+ default: 'PENDING'
55
+ }
56
+ }]
57
+ }, { timestamps: true });
58
+
59
+ const OrderPayment = mongoose.model('orderPayment', paymentSchema);
60
+ export default OrderPayment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flykup_model_development",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "private": false,