googleLocation added in branch

master^2
Bhaskar 2 months ago
parent a33e1dafa0
commit 792e511641

@ -79,7 +79,9 @@ const generateDepartmentId = async (city, departmentName) => {
updatedBy, updatedBy,
email, email,
gstNo, gstNo,
googleLocation googleLocation,
latitude,
longitude
} = request.body; } = request.body;
// Generate unique cityId // Generate unique cityId
@ -118,6 +120,8 @@ const generateDepartmentId = async (city, departmentName) => {
email, email,
gstNo, gstNo,
googleLocation, googleLocation,
latitude,
longitude,
createdBy, createdBy,
updatedBy, updatedBy,
}); });
@ -148,7 +152,10 @@ const generateDepartmentId = async (city, departmentName) => {
createdBy, createdBy,
updatedBy, updatedBy,
email, email,
nameoftheContactPerson nameoftheContactPerson,
googleLocation,
latitude,
longitude
} = request.body; } = request.body;
// Generate departmentId based on departmentName // Generate departmentId based on departmentName
@ -178,6 +185,9 @@ const generateDepartmentId = async (city, departmentName) => {
pincode, pincode,
email, email,
nameoftheContactPerson, nameoftheContactPerson,
googleLocation,
latitude,
longitude,
// departmentName, // departmentName,
createdBy, createdBy,
updatedBy, updatedBy,

@ -15,6 +15,8 @@ const citySchema = new mongoose.Schema(
address2: String, address2: String,
pincode: { type: String }, pincode: { type: String },
zone: { type: String }, zone: { type: String },
longitude: { type: Number, default: 0.0 },
latitude: { type: Number, default: 0.0 },
googleLocation: { type: String }, googleLocation: { type: String },
gstNo: { type: String }, gstNo: { type: String },
city: { type: String }, city: { type: String },
@ -54,6 +56,10 @@ const citySchema = new mongoose.Schema(
zone: { type: String , default: "ALL"}, zone: { type: String , default: "ALL"},
city: { type: String }, city: { type: String },
location: [{ type : String}], location: [{ type : String}],
googleLocation: { type: String },
longitude: { type: Number, default: 0.0 },
latitude: { type: Number, default: 0.0 },
googleLocation: { type: String },
state: String, state: String,
country: String, country: String,
nameoftheContactPerson: String, nameoftheContactPerson: String,

@ -28,7 +28,8 @@ module.exports = function (fastify, opts, next) {
pincode: { type: "string" }, pincode: { type: "string" },
googleLocation: { type: "string" }, googleLocation: { type: "string" },
gstNo: { type: "string" }, gstNo: { type: "string" },
latitude: { type: 'number', default: 0.0 },
longitude: { type: 'number', default: 0.0 },
//departmentName: { type: "string" }, //departmentName: { type: "string" },
}, },
}, },
@ -567,7 +568,10 @@ module.exports = function (fastify, opts, next) {
address2: { type: "string" }, address2: { type: "string" },
zone: { type: "string" }, zone: { type: "string" },
pincode: { type: "string" }, pincode: { type: "string" },
nameoftheContactPerson: { type: "string"} nameoftheContactPerson: { type: "string"},
googleLocation: { type: "string" },
latitude: { type: 'number', default: 0.0 },
longitude: { type: 'number', default: 0.0 },
//departmentName: { type: "string" }, //departmentName: { type: "string" },
}, },
}, },

Loading…
Cancel
Save