Skip to content

Commit

Permalink
adding button logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Prateek579 committed May 14, 2024
1 parent e270b74 commit 81ad298
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 81ad298

Please sign in to comment.