picker-db 3.7.5 → 3.8.0

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.
@@ -21,6 +21,7 @@ const PreferenceSchema = require("../schemas/preference");
21
21
  const ReferralUsageSchema = require("../schemas/referralUsage");
22
22
  const ReviewSchema = require("../schemas/review");
23
23
  const BookingRequestSchema = require("../schemas/bookingRequest");
24
+ const MiniBookingSchema = require("../schemas/miniBooking");
24
25
 
25
26
  /** @param {import("mongoose")} connection */
26
27
  module.exports = (connection) => {
@@ -48,5 +49,6 @@ module.exports = (connection) => {
48
49
  Preference: connection.model("Preference", PreferenceSchema(connection)),
49
50
  ReferralUsage: connection.model("ReferralUsage", ReferralUsageSchema(connection)),
50
51
  Review: connection.model("Review", ReviewSchema(connection)),
52
+ MiniBooking: connection.model("MiniBooking", MiniBookingSchema(connection)),
51
53
  };
52
54
  };
@@ -772,12 +772,12 @@ module.exports = (connection) => {
772
772
  type: Boolean,
773
773
  default: false,
774
774
  },
775
- rating: {
776
- type: Number
777
- },
778
775
  review: {
779
776
  type: String
780
777
  },
778
+ rating: {
779
+ type: Number
780
+ },
781
781
  }, { timestamps: true });
782
782
 
783
783
  BookingSchema.pre("save", function (next) {
@@ -0,0 +1,18 @@
1
+
2
+ /** @param {import("mongoose")} connection */
3
+ module.exports = (connection) => {
4
+ const MiniBookingSchema = new connection.base.Schema({
5
+ bookingNumericId: { type: Number, required: true },
6
+ bookingID: { type: connection.base.Schema.ObjectId, ref: 'Bookings', required: true },
7
+ statusText: { type: String },
8
+ deliveryProvider: { type: String },
9
+ createdAt: { type: String },
10
+ driverName: { type: String },
11
+ driverPhone: { type: String },
12
+ customerName: { type: String },
13
+ deliveryAddress: { type: String },
14
+ businessName: { type: String },
15
+ }, { timestamps: false });
16
+
17
+ return MiniBookingSchema;
18
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picker-db",
3
- "version": "3.7.5",
3
+ "version": "3.8.0",
4
4
  "description": "Picker DB services",
5
5
  "main": "index.js",
6
6
  "scripts": {