added capacity in bores and pipelines

master
varun 3 years ago
parent 8dd793c117
commit b096ddce3a

@ -180,6 +180,7 @@ exports.addBores = async (req, reply) => {
boresData = { boresData = {
customerId:customerId, customerId:customerId,
boreName: req.body.boreName, boreName: req.body.boreName,
capacity: req.body.capacity,
typeofwater: req.body.typeofwater, typeofwater: req.body.typeofwater,
description: req.body.description, description: req.body.description,
}; };
@ -199,7 +200,8 @@ exports.addBores = async (req, reply) => {
usertobeInserted = checkFormEncoding.bores; usertobeInserted = checkFormEncoding.bores;
console.log("thsi true url string"); console.log("thsi true url string");
bores.customerId = usertobeInserted.customerId bores.customerId = usertobeInserted.customerId
bores.boreName = usertobeInserted.boreName; bores.boreName = usertobeInserted.boreName;
bores.capacity = usertobeInserted.capacity;
bores.typeofwater = usertobeInserted.typeofwater; bores.typeofwater = usertobeInserted.typeofwater;
bores.description = usertobeInserted.description; bores.description = usertobeInserted.description;
} }
@ -278,6 +280,7 @@ exports.addGovtPIpeline = async (req, reply) => {
pipelineData = { pipelineData = {
customerId:customerId, customerId:customerId,
Name: req.body.Name, Name: req.body.Name,
capacity: req.body.capacity,
typeofwater: req.body.typeofwater, typeofwater: req.body.typeofwater,
description: req.body.description, description: req.body.description,
}; };
@ -297,7 +300,8 @@ exports.addGovtPIpeline = async (req, reply) => {
usertobeInserted = checkFormEncoding.pipe_line; usertobeInserted = checkFormEncoding.pipe_line;
console.log("thsi true url string"); console.log("thsi true url string");
pipe_line.customerId = usertobeInserted.customerId pipe_line.customerId = usertobeInserted.customerId
pipe_line.Name = usertobeInserted.Name; pipe_line.Name = usertobeInserted.Name;
pipe_line.capacity = usertobeInserted.capacity;
pipe_line.typeofwater = usertobeInserted.typeofwater; pipe_line.typeofwater = usertobeInserted.typeofwater;
pipe_line.description = usertobeInserted.description; pipe_line.description = usertobeInserted.description;
} }

@ -38,7 +38,9 @@ const tankersbookingSchema = new mongoose.Schema({
const boreSchema = new mongoose.Schema({ const boreSchema = new mongoose.Schema({
customerId: { type: String, default: null }, customerId: { type: String, default: null },
boreName: { type: String, default: null }, boreName: { type: String, default: null },
capacity: { type: String, default: null },
typeofwater: { type: String, default: null }, typeofwater: { type: String, default: null },
description: { type: String, default: null }, description: { type: String, default: null },
@ -48,6 +50,7 @@ const boreSchema = new mongoose.Schema({
const GovtPipeLineSchema = new mongoose.Schema({ const GovtPipeLineSchema = new mongoose.Schema({
customerId: { type: String, default: null }, customerId: { type: String, default: null },
Name: { type: String, default: null }, Name: { type: String, default: null },
capacity: { type: String, default: null },
typeofwater: { type: String, default: null }, typeofwater: { type: String, default: null },
description: { type: String, default: null }, description: { type: String, default: null },

@ -227,6 +227,7 @@ module.exports = function (fastify, opts, next) {
type: "object", type: "object",
properties: { properties: {
boreName: { type: "string" }, boreName: { type: "string" },
capacity: { type: "string" },
typeofwater: { type: "string" }, typeofwater: { type: "string" },
description: { type: "string" }, description: { type: "string" },
}, },
@ -321,6 +322,7 @@ module.exports = function (fastify, opts, next) {
properties: { properties: {
boreName: { type: "string" }, boreName: { type: "string" },
capacity: { type: "string" },
typeofwater: { type: "string" }, typeofwater: { type: "string" },
description: { type: "string" }, description: { type: "string" },
}, },
@ -363,6 +365,7 @@ module.exports = function (fastify, opts, next) {
type: "object", type: "object",
properties: { properties: {
Name: { type: "string" }, Name: { type: "string" },
capacity: { type: "string" },
typeofwater: { type: "string" }, typeofwater: { type: "string" },
description: { type: "string" }, description: { type: "string" },
}, },
@ -457,6 +460,7 @@ module.exports = function (fastify, opts, next) {
properties: { properties: {
Name: { type: "string" }, Name: { type: "string" },
capacity: { type: "string" },
typeofwater: { type: "string" }, typeofwater: { type: "string" },
description: { type: "string" }, description: { type: "string" },
}, },
@ -477,13 +481,6 @@ module.exports = function (fastify, opts, next) {
next(); next();
} }

Loading…
Cancel
Save