flykup_model_development 3.1.68 → 3.1.69

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.
@@ -61,7 +61,9 @@ const paymentSchema = new mongoose.Schema({
61
61
  },
62
62
  paymentMethod: String,
63
63
  transactionTime: Date,
64
- sellerPayments: [{
64
+
65
+ // ✅ SELLER PAYMENTS FIELD - Now matching package model
66
+ sellerPayments: [{
65
67
  sellerId: {
66
68
  type: mongoose.Schema.Types.ObjectId,
67
69
  ref: 'users',
@@ -94,12 +96,124 @@ const paymentSchema = new mongoose.Schema({
94
96
 
95
97
  // Create indexes for better performance
96
98
  paymentSchema.index({ razorpayOrderId: 1 });
97
- // paymentSchema.index({ cfOrderId: 1 });
98
99
  paymentSchema.index({ orderId: 1 });
99
100
 
100
- // ❌ The pre-save middleware is no longer needed and should be removed.
101
-
102
101
  const OrderPayment =
103
102
  mongoose.models.OrderPayment || mongoose.model('orderPayment', paymentSchema);
104
103
 
105
- export default OrderPayment;
104
+ export default OrderPayment;
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+ // import mongoose from 'mongoose';
116
+
117
+ // const paymentSchema = new mongoose.Schema({
118
+ // orderId: {
119
+ // type: mongoose.Schema.Types.ObjectId,
120
+ // ref: 'Order',
121
+ // required: true
122
+ // },
123
+ // userId: {
124
+ // type: mongoose.Schema.Types.ObjectId,
125
+ // ref: 'users',
126
+ // required: true
127
+ // },
128
+ // paymentGateway: {
129
+ // type: String,
130
+ // enum: ['RAZORPAY', 'CASHFREE'],
131
+ // required: true
132
+ // },
133
+
134
+ // // Razorpay-specific fields
135
+ // razorpayOrderId: {
136
+ // type: String,
137
+ // // ✅ This field is now required only if the gateway is RAZORPAY
138
+ // required: function() {
139
+ // return this.paymentGateway === 'RAZORPAY';
140
+ // }
141
+ // },
142
+ // razorpayPaymentId: {
143
+ // type: String,
144
+ // default: null
145
+ // },
146
+
147
+ // // Cashfree-specific fields
148
+ // cfPaymentSessionId: {
149
+ // type: String,
150
+ // // ✅ This field is now required only if the gateway is CASHFREE
151
+ // required: function() {
152
+ // return this.paymentGateway === 'CASHFREE';
153
+ // }
154
+ // },
155
+ // cfOrderId: {
156
+ // type: String,
157
+ // // ✅ This field is now required only if the gateway is CASHFREE
158
+ // required: function() {
159
+ // return this.paymentGateway === 'CASHFREE';
160
+ // }
161
+ // },
162
+
163
+ // amount: {
164
+ // type: Number,
165
+ // required: true
166
+ // },
167
+ // currency: {
168
+ // type: String,
169
+ // default: 'INR'
170
+ // },
171
+ // status: {
172
+ // type: String,
173
+ // enum: ['PENDING', 'SUCCESS', 'FAILED', 'REFUNDED'],
174
+ // default: 'PENDING'
175
+ // },
176
+ // paymentMethod: String,
177
+ // transactionTime: Date,
178
+ // sellerPayments: [{
179
+ // sellerId: {
180
+ // type: mongoose.Schema.Types.ObjectId,
181
+ // ref: 'users',
182
+ // required: true
183
+ // },
184
+ // payableAmount: { // Amount for products only
185
+ // type: Number,
186
+ // required: true,
187
+ // default: 0
188
+ // },
189
+ // deliveryCharge: { // Delivery fee for this seller's shipment
190
+ // type: Number,
191
+ // required: true,
192
+ // default: 0
193
+ // },
194
+ // totalAmount: { // The sum of payableAmount + deliveryCharge
195
+ // type: Number,
196
+ // required: true,
197
+ // default: 0
198
+ // },
199
+ // settlementStatus: {
200
+ // type: String,
201
+ // enum: ['PENDING', 'SETTLED', 'FAILED'],
202
+ // default: 'PENDING'
203
+ // }
204
+ // }]
205
+ // }, {
206
+ // timestamps: true
207
+ // });
208
+
209
+ // // Create indexes for better performance
210
+ // paymentSchema.index({ razorpayOrderId: 1 });
211
+ // // paymentSchema.index({ cfOrderId: 1 });
212
+ // paymentSchema.index({ orderId: 1 });
213
+
214
+ // // ❌ The pre-save middleware is no longer needed and should be removed.
215
+
216
+ // const OrderPayment =
217
+ // mongoose.models.OrderPayment || mongoose.model('orderPayment', paymentSchema);
218
+
219
+ // export default OrderPayment;
@@ -0,0 +1,4 @@
1
+ Seller Name,Owner Name,Email,Mobile,Total Amount,Total Orders,Total Products,Account Number,IFSC Code,Bank Name
2
+ "HARISH A","HARISH A","thebrandspot@gmail.com","THEBRANDSPOT","1270","38","38","","",""
3
+ "Shanthi","Shanthi","shanthiaravindan81@gmail.com","+919500060775","450","1","1","","",""
4
+ "Gokul Krishnan","Gokul Krishnan","gkgokul1817@gmail.com","gokul_krishnan","55","1","1","","",""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flykup_model_development",
3
- "version": "3.1.68",
3
+ "version": "3.1.69",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "private": false,