picker-db 3.7.1 → 3.7.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.
- package/constants.js +14 -0
- package/modules/picker/schemas/bookings.js +62 -2
- package/package.json +1 -1
package/constants.js
CHANGED
|
@@ -228,6 +228,20 @@ module.exports = {
|
|
|
228
228
|
TEXT: "RETURNED_TO_PICKUP",
|
|
229
229
|
},
|
|
230
230
|
},
|
|
231
|
+
PROOF_OF_DELIVERY: {
|
|
232
|
+
NONE:{
|
|
233
|
+
index: 0,
|
|
234
|
+
text: "NONE",
|
|
235
|
+
} ,
|
|
236
|
+
CODE: {
|
|
237
|
+
index: 1,
|
|
238
|
+
text: "CODE",
|
|
239
|
+
} ,
|
|
240
|
+
PHOTO: {
|
|
241
|
+
index: 2,
|
|
242
|
+
text: "PHOTO",
|
|
243
|
+
}
|
|
244
|
+
},
|
|
231
245
|
SOCIAL_ACCOUNTS: {
|
|
232
246
|
FACEBOOK: "facebook",
|
|
233
247
|
GOOGLE: "google",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { VEHICLE_TYPES, PAYMENT_METHODS, BOOKING_TYPES, BOOKING_STATUS, DELIVERY_CHARGE_TYPE } = require("../../../constants");
|
|
1
|
+
const { VEHICLE_TYPES, PAYMENT_METHODS, BOOKING_TYPES, BOOKING_STATUS, DELIVERY_CHARGE_TYPE, PROOF_OF_DELIVERY } = require("../../../constants");
|
|
2
2
|
const { DEVICE_TYPES } = require("../../../constants").USER;
|
|
3
3
|
|
|
4
4
|
const PricingDetailsSchema = require("./pricingDetails");
|
|
@@ -699,7 +699,67 @@ module.exports = (connection) => {
|
|
|
699
699
|
usedGoogleAddress: {
|
|
700
700
|
type: String,
|
|
701
701
|
default: false
|
|
702
|
-
}
|
|
702
|
+
},
|
|
703
|
+
currency: {
|
|
704
|
+
type: String,
|
|
705
|
+
default: "USD"
|
|
706
|
+
},
|
|
707
|
+
lastResponsableAction: {
|
|
708
|
+
type: String,
|
|
709
|
+
},
|
|
710
|
+
timeOnBatch: {
|
|
711
|
+
type: Number,
|
|
712
|
+
},
|
|
713
|
+
externalBookingId: {
|
|
714
|
+
type: String,
|
|
715
|
+
index: true,
|
|
716
|
+
},
|
|
717
|
+
userBookingCreator: {
|
|
718
|
+
type: String,
|
|
719
|
+
},
|
|
720
|
+
isActiveOnBatch: {
|
|
721
|
+
type: Boolean,
|
|
722
|
+
default: true,
|
|
723
|
+
},
|
|
724
|
+
isProofOfDeliveryApproved: {
|
|
725
|
+
type: Boolean,
|
|
726
|
+
default: false,
|
|
727
|
+
},
|
|
728
|
+
proofValidationCode: {
|
|
729
|
+
type: String,
|
|
730
|
+
},
|
|
731
|
+
proofOfDeliveryType: {
|
|
732
|
+
type: String,
|
|
733
|
+
enum: [
|
|
734
|
+
PROOF_OF_DELIVERY.CODE.text,
|
|
735
|
+
PROOF_OF_DELIVERY.NONE.text,
|
|
736
|
+
PROOF_OF_DELIVERY.PHOTO.text,
|
|
737
|
+
],
|
|
738
|
+
default: PROOF_OF_DELIVERY.NONE.text,
|
|
739
|
+
},
|
|
740
|
+
wasManuallyRequested: {
|
|
741
|
+
type: Boolean,
|
|
742
|
+
default: false,
|
|
743
|
+
},
|
|
744
|
+
manualRequestReason: {
|
|
745
|
+
type: String,
|
|
746
|
+
},
|
|
747
|
+
wasManuallyAssigned: {
|
|
748
|
+
type: Boolean,
|
|
749
|
+
default: false,
|
|
750
|
+
},
|
|
751
|
+
manualAssignReason: {
|
|
752
|
+
type: String,
|
|
753
|
+
},
|
|
754
|
+
notDeliveredReason: {
|
|
755
|
+
type: String,
|
|
756
|
+
},
|
|
757
|
+
cancelReasonByBusiness: {
|
|
758
|
+
type: String
|
|
759
|
+
},
|
|
760
|
+
cancelReasonByAdmin: {
|
|
761
|
+
type: String
|
|
762
|
+
},
|
|
703
763
|
}, { timestamps: true });
|
|
704
764
|
|
|
705
765
|
BookingSchema.pre("save", function (next) {
|