flykup_model_development 3.1.30 → 3.1.32
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 +4 -1
- package/models/notification.model.js +2 -1
- package/models/orderPayment.model.js +1 -61
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -33,6 +33,7 @@ import SellerDraft from './models/sellerDraft.model.js';
|
|
|
33
33
|
import AadhaarVerification from './models/AadhaarVerification.js';
|
|
34
34
|
import BankVerification from './models/BankVerification.js';
|
|
35
35
|
import GSTVerification from './models/GSTVerification.js';
|
|
36
|
+
import OrderPayment from './models/orderPayment.model.js';
|
|
36
37
|
let initialized = false;
|
|
37
38
|
|
|
38
39
|
export async function initializeSharedModels({ token, dbUri }) {
|
|
@@ -97,6 +98,7 @@ export const SellerDraftModel = createModelProxy(SellerDraft);
|
|
|
97
98
|
export const AadhaarVerificationModel = createModelProxy(AadhaarVerification);
|
|
98
99
|
export const BankVerificationModel = createModelProxy(BankVerification);
|
|
99
100
|
export const GSTVerificationModel = createModelProxy(GSTVerification);
|
|
101
|
+
export const OrderPaymentModel = createModelProxy(OrderPayment)
|
|
100
102
|
|
|
101
103
|
export {
|
|
102
104
|
AdminModel as Admin,
|
|
@@ -133,5 +135,6 @@ export {
|
|
|
133
135
|
SellerDraftModel as SellerDraft,
|
|
134
136
|
AadhaarVerificationModel as AadhaarVerification,
|
|
135
137
|
BankVerificationModel as BankVerification,
|
|
136
|
-
GSTVerificationModel as GSTVerification
|
|
138
|
+
GSTVerificationModel as GSTVerification,
|
|
139
|
+
OrderPaymentModel as OrderPayment
|
|
137
140
|
};
|
|
@@ -1,63 +1,3 @@
|
|
|
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;
|
|
61
1
|
import mongoose from 'mongoose';
|
|
62
2
|
|
|
63
3
|
const paymentSchema = new mongoose.Schema({
|
|
@@ -130,7 +70,7 @@ const paymentSchema = new mongoose.Schema({
|
|
|
130
70
|
amount: Number,
|
|
131
71
|
settlementStatus: {
|
|
132
72
|
type: String,
|
|
133
|
-
enum: ['PENDING', 'SETTLED'],
|
|
73
|
+
enum: ['PENDING', 'SETTLED','FAILED'],
|
|
134
74
|
default: 'PENDING'
|
|
135
75
|
}
|
|
136
76
|
}]
|