made changes in booking data in tankers

master
varun 3 years ago
parent 36ee87c5b2
commit 1db83db757

@ -123,7 +123,8 @@ exports.tankerBooking = async (req, reply) => {
typeofwater: req.body.typeofwater, typeofwater: req.body.typeofwater,
capacity: req.body.capacity, capacity: req.body.capacity,
address: req.body.address, address: req.body.address,
dateTime: req.body.dateTime, dateOfOrder: req.body.dateOfOrder,
}; };
@ -137,7 +138,10 @@ exports.tankerBooking = async (req, reply) => {
tankersBookingData.capacity = usertobeInserted.capacity; tankersBookingData.capacity = usertobeInserted.capacity;
tankersBookingData.typeofwater = usertobeInserted.typeofwater; tankersBookingData.typeofwater = usertobeInserted.typeofwater;
tankersBookingData.address = usertobeInserted.address; tankersBookingData.address = usertobeInserted.address;
tankersBookingData.dateTime = usertobeInserted.dateTime; tankersBookingData.dateOfOrder = usertobeInserted.dateOfOrder;
} }

@ -14,19 +14,20 @@ const tankersSchema = new mongoose.Schema({
tankerName: { type: String, default: null }, tankerName: { type: String, default: null },
phoneNumber: { type: String, default: null }, phoneNumber: { type: String, default: null },
typeofwater: [{ type: String, default: null }], typeofwater: [{ type: String, default: null }],
capacity: [{ type: String, default: null }], capacity: [{ type: String, default: null }],
}); });
const tankersbookingSchema = new mongoose.Schema({ const tankersbookingSchema = new mongoose.Schema({
bookingid: { type: String, default: null,unique: true }, bookingid: { type: String, default: null,unique: true },
dateOfOrder: { type: String, default: null },
typeofwater: { type: String, default: null }, typeofwater: { type: String, default: null },
capacity: { type: String, default: null }, capacity: { type: String, default: null },
address: { type: String, default: null }, address: { type: String, default: null },
dateTime: { type: String, default: null },
amount : { type: String, default: "due" }, amount : { type: String, default: "due" },
//orderStatus: { type: String, default: "due" },
}); });

@ -123,7 +123,7 @@ module.exports = function (fastify, opts, next) {
typeofwater: { type: "string" }, typeofwater: { type: "string" },
capacity: { type: "string" }, capacity: { type: "string" },
address: { type: "string" }, address: { type: "string" },
dateTime: { type: "string"}, dateOfOrder: { type: "string"},
}, },

Loading…
Cancel
Save