picker-db 4.10.0 → 4.11.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.
@@ -25,6 +25,7 @@ const BookingLiteSchema = require("../schemas/bookingsLite");
25
25
  const MiniBookingSchema = require("../schemas/miniBooking");
26
26
  const BookingDriverDetailsSchema = require("../schemas/bookingDriverDetails");
27
27
  const ConversationSchema = require("../schemas/conversation");
28
+ const BookingMetadataSchema = require("../schemas/bookingMetadata");
28
29
 
29
30
  /** @param {import("mongoose")} connection */
30
31
  module.exports = (connection) => {
@@ -56,5 +57,6 @@ module.exports = (connection) => {
56
57
  MiniBooking: connection.model("MiniBooking", MiniBookingSchema(connection)),
57
58
  BookingDriverDetails: connection.model("BookingDriverDetails", BookingDriverDetailsSchema(connection)),
58
59
  Conversation: connection.model("Conversation", ConversationSchema(connection)),
60
+ BookingMetadata: connection.model("BookingMetadata", BookingMetadataSchema(connection)),
59
61
  };
60
62
  };
@@ -0,0 +1,27 @@
1
+ /** @param {import("mongoose")} connection */
2
+ module.exports = (connection) => {
3
+ const BookingMetadataSchema = new connection.base.Schema({
4
+ bookingID: {
5
+ type: connection.base.Schema.ObjectId,
6
+ ref: "Bookings",
7
+ index: true,
8
+ sparse: true,
9
+ },
10
+ preBookingID: {
11
+ type: connection.base.Schema.ObjectId,
12
+ index: true,
13
+ sparse: true,
14
+ },
15
+ referenceRecommendation: {
16
+ reference: { type: String, required: false },
17
+ residential: { type: String, required: false },
18
+ apartment: { type: String, required: false },
19
+ instruction: { type: String, required: false },
20
+ },
21
+ attributes: { type: [{ type: String }], required: false },
22
+ }, {
23
+ timestamps: true
24
+ });
25
+
26
+ return BookingMetadataSchema;
27
+ };
@@ -935,6 +935,7 @@ module.exports = (connection) => {
935
935
  },
936
936
  default: {},
937
937
  required: false,
938
+ _id: false,
938
939
  },
939
940
  }, { timestamps: true });
940
941
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picker-db",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
4
4
  "description": "Picker DB services",
5
5
  "main": "index.js",
6
6
  "scripts": {