Skip to content

Commit

Permalink
Merge pull request #63 from Prateek579/add-profile
Browse files Browse the repository at this point in the history
Thank you @Prateek579  for your contribution
  • Loading branch information
Sahil1786 authored May 14, 2024
2 parents e270b74 + 81ad298 commit 7bb03ec
Show file tree
Hide file tree
Showing 9 changed files with 1,502 additions and 973 deletions.
14 changes: 9 additions & 5 deletions model/query.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
const mongoose = require('mongoose');
const mongoose = require("mongoose");

const querySchema = new mongoose.Schema({
const querySchema = new mongoose.Schema(
{
name: String,
email: String,
subject: String,
message: String
}, { timestamps: true });
message: String,
approved: { type: Boolean, default: false },
},
{ timestamps: true }
);

const Query = mongoose.model('Query', querySchema);
const Query = mongoose.model("Query", querySchema);

module.exports = Query;
63 changes: 31 additions & 32 deletions model/user.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
const mongoose = require('mongoose');

const mongoose = require("mongoose");

const userSchema = new mongoose.Schema({
// username: {
// type: String,
// unique: true,
// required: true,
// },
email: String,
password: String,
fullName: String,
address: String,
Mobile: Number,
dob: String,
gender: {
type: String,
enum: ['male', 'female', 'other'],
// username: {
// type: String,
// unique: true,
// required: true,
// },
email: String,
password: String,
fullName: String,
address: String,
Mobile: Number,
dob: String,
gender: {
type: String,
enum: ["male", "female", "other"],
},
flatNo: { type: String },
addressLine1: { type: String },
addressLine2: { type: String },
city: { type: String },
state: { type: String },
zip: { type: String },
foodInventory: [
{
foodItem: { type: String },
quantity: { type: Number },
},
flatNo: { type: String },
addressLine1: { type: String },
addressLine2: { type: String },
city: { type: String },
state: { type: String },
zip: { type: String },
foodInventory: [
{
foodItem: { type: String },
quantity: { type: Number }
}
]
// googleId: String,
// profile: String,
],
approved: { type: Boolean, default: false },
// googleId: String,
// profile: String,
});


const User = new mongoose.model("User", userSchema);
module.exports=User
module.exports = User;
88 changes: 88 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7bb03ec

Please sign in to comment.