diff --git a/README.md b/README.md index 442a5d6..8b13789 100644 --- a/README.md +++ b/README.md @@ -1,3 +1 @@ -# MessApp -gaand mari hui h diff --git a/backend/controllers/Customer.controller.js b/backend/controllers/Customer.controller.js deleted file mode 100644 index 93c76d8..0000000 --- a/backend/controllers/Customer.controller.js +++ /dev/null @@ -1,72 +0,0 @@ -import client from "../db.js" -export const startQuiz = async (req, res) => { - const { User_id,Quiz_id } = req.body; - let exists; - try { - exists = await client.query( - "Select * from Questions where Questions.Quiz_id=$1;", - [Quiz_id] - ); - } catch (err) { - console.log(err); - } - if (exists.rowCount == 1) { - res.status(200).send( - exists - ); - } - else { - res.status(500).send("Wrong Quiz_id"); - } -}; - -export const seeLeaderboard = async (req, res) => { - const { Quiz_id } = req.body; - let exists; - try { - exists = await client.query( - "SELECT Fname || ' ' || Lname , correct_answers FROM User_data ,Marks where Marks.User_id = User_data.User_id and Marks.Quiz_id = $1", - [Quiz_id] - ); - } catch (err) { - console.log(err); - } - if (exists.rowCount != 0) { - res.status(200).send( - exists - ); - } - else { - res.status(500).send("NO result Found for this Quiz Id"); - } -}; - -export const endQuiz= async (req, res) => { - const { User_id, Quiz_id, selected } = req.body; - let exists; - console.log("wwd"); - try { - exists = await client.query( - "select correct_options from Questions where Quiz_id= $1", - [Quiz_id] - ); - } catch (err) { - console.log(err); - } - console.log("wwd"); - let count=0; - for(let i=0;i { + + let exists; + try { + exists = await client.query("select * from Mess "); + } catch (err) { + console.log(err); + } + console.log(exists.rows); + res.status(200).send(exists.rows); + }; + + + export const Subscribe_mess = async (req, res) => { + const { User_id, Mess_id, tokens } = req.body; + // INSERT INTO TableName (DateColumn) VALUES (CURRENT_DATE); + let exists; + try { + exists = await client.query("INSERT INTO Subscription(User_id,Mess_id,tokens,Daily_tokens,Subscription_date) VALUES($1,$2,$3,1,CURRENT_DATE);", [ + User_id, Mess_id, tokens + ]); + } catch (err) { + console.log(err); + } + // console.log(exists.rows); + res.status(200).send("Successfully Subscribed!"); + }; + + // use to alert user that subscription is about to end + export const Remaining_Daily_tokens = async (req,res) => { + const {User_id,Mess_id} = req.body; + + let exists; + + try { + exists = await client.query("Select Daily_tokens from Subscriptions where Mess_id=$1 and User_id = $2", + [ + Mess_id,User_id + ]) + }catch(err) { + console.log(err); + } + + res.status(200).send(exists.rowCount); + } + + // when user changes number of tiffins per day + export const Change_daily_tokens = async (req, res) => { + const { User_id,Mess_id,Daily_tokens} = req.body; + let exists; + try { + exists = await client.query("UPDATE Subscription SET Daily_tokens=$3 where User_id=$1 and Mess_id=$2", + [ + User_id,Mess_id,Daily_tokens + ]); + } catch (err) { + console.log(err); + } + // console.log(exists.rows); + res.status(200).send("Successfully Updated Daily Tokens!"); + }; + + export const Rate_Mess = async(req,res) => { + + const {User_id,Mess_id,Rating} = req.body; + + let exists; + try { + exists = await client.query("Select * from Ratings where User_id = $1 and Mess_id = $2", + [ + User_id,Mess_id + ]); + } catch (err) { + console.log(err); + } + + if(exists.rowCount!=0) + { + res.status(500).send("Cannot Rate the same Mess multiple times"); + }else + { + try { + exists = await client.query("Insert into Ratings(User_id,Mess_id,Rating) Values($1,$2,$3)", + [ + User_id,Mess_id,Rating + ]); + } catch (err) { + console.log(err); + } + } + res.status(200).send("Successfully Rated"); + } + + export const Update_profile = async (req, res) => { + + const {User_id,Fname, Lname, Phone_num, Password, User_address} = req.body; + + let exists; + try { + exists = await client.query("UPDATE Users SET Fname=$1, Lname=$2, Phone_num=$3, Password=$4, User_address=$5 where User_id=$6", + [ + Fname, Lname, Phone_num, Password, User_address,User_id + ]); + } catch (err) { + console.log(err); + } + // console.log(exists.rows); + res.status(200).send("Successfully Updated Profile!"); + }; + + export const filter_mess = async(req,res) => { + + const {Filter_rating} = req.body; + let exists; + + try{ + exists = await client.query("select * from Mess where Mess_id in (Select Mess_id from Ratings group by Mess_id having avg(Rating)>$1)",[Filter_rating]); + }catch(err){ + + console.log(err); + } + res.status(200).send(exists.body); + } + + export const Make_payment = async(req,res) => { + + } + + // daily tokens in subscription + // seperate rating table user id mess id rating + \ No newline at end of file diff --git a/backend/controllers/Delivery_boy.controller.js b/backend/controllers/Delivery_boy.controller.js deleted file mode 100644 index 691f412..0000000 --- a/backend/controllers/Delivery_boy.controller.js +++ /dev/null @@ -1,110 +0,0 @@ -import client from "../db.js"; -export const createQuiz = async (req, res) => { - const { user_id, question_count, name, duration } = req.body; - console.log(user_id); - console.log(question_count); - console.log(name); - console.log(duration); - let exists; - try { - await client.query( - "INSERT INTO Quiz(Creater_id,Name,questions_count,duration) VALUES($1,$2,$3,$4);", - [user_id, name, question_count, duration] - ); - } catch (err) { - console.log(err); - } - - try { - exists = await client.query("select max(Quiz_id) from Quiz"); - } catch (err) { - console.log(err); - } - - console.log(exists.rows[0]); - res.status(200).send(exists.rows[0]); -}; - -export const addQuestion = async (req, res) => { - const { - quiz_id, - question, - option_1, - option_2, - option_3, - option_4, - correct_answer, - } = req.body; - let exists; - try { - exists = await client.query( - "INSERT INTO Questions(Quiz_id,Ques_text,Option_1,Option_2,Option_3,Option_4,Correct_Option) VALUES($1,$2,$3,$4,$5,$6,$7);", - [ - quiz_id, - question, - option_1, - option_2, - option_3, - option_4, - correct_answer, - ] - ); - } catch (err) { - console.log(err); - } - res.status(200).send("question added sucessfully"); -}; - -export const viewQuestions = async (req, res) => { - const { quiz_id } = req.body; - let exists; - try { - exists = await client.query("select * from questions where Quiz_id=$1", [ - quiz_id, - ]); - } catch (err) { - console.log(err); - } - console.log(exists.rows); - res.status(200).send(exists.rows); -}; - -export const viewQuizzes = async (req, res) => { - const { user_id } = req.body; - let exists; - try { - exists = await client.query("select * from quiz where Creater_id=$1", [ - user_id, - ]); - } catch (err) { - console.log(err); - } - console.log(exists.rows); - res.status(200).send(exists.rows); -}; - -export const deleteQuiz = async (req, res) => { - const { user_id, quiz_id } = req.body; - let exists; - - try { - exists = await client.query( - "select * from Quiz where Quiz_id=$1 and Creater_id=$2", - [quiz_id, user_id] - ); - } catch (err) { - console.log(err); - } - - if (exists.rowCount === 0) res.status(500).send("Cannot delete Quiz"); - else { - try { - await client.query("delete from Marks where Quiz_id=$1", [quiz_id]); - await client.query("delete from Questions where Quiz_id=$1", [quiz_id]); - await client.query("delete from Quiz where Quiz_id=$1", [quiz_id]); - } catch (err) { - console.log(err); - } - res.status(200).send("Deleted"); - } -}; diff --git a/backend/controllers/Mess_owner.controller.js b/backend/controllers/Delivery_controller.js similarity index 100% rename from backend/controllers/Mess_owner.controller.js rename to backend/controllers/Delivery_controller.js diff --git a/backend/routes/Mess_owner.js b/backend/controllers/Mess_owner_controller.js similarity index 100% rename from backend/routes/Mess_owner.js rename to backend/controllers/Mess_owner_controller.js diff --git a/backend/controllers/Sign_controller.js b/backend/controllers/Sign_controller.js new file mode 100644 index 0000000..1154a16 --- /dev/null +++ b/backend/controllers/Sign_controller.js @@ -0,0 +1,48 @@ +import client from "../db.js"; +export const createUser = async (req, res) => { + const { Fname, Lname, Phone_num, Email, Password, User_address, User_type} = req.body; + let exists; + try { + exists = await client.query( + "Select * from Users where Users.email=$1 and Users.type=$2;", + [Email,User_type] + ); + } catch (err) { + console.log(err); + } + + if (exists.rowCount != 0) { + res.status(500).send("User already Existed. Try Sign in instead "); + } else { + let newUser; + try { + newUser = await client.query( + "INSERT INTO Users(Fname, Lname, Phone_num, Email, Password, User_address, User_type) VALUES ($1,$2,$3,$4,$5,$6,$7);", + [Fname, Lname, Phone_num, Email, Password, User_address, User_type] + ); + res.status(200).send("User has been created"); + } catch (err) { + console.log(err); + } + } +}; + +export const logInUser = async (req, res) => { + console.log("Email"); + const { Email, Password, User_type} = req.body; + + let userExists; + try { + userExists = await client.query( + "select User_id from Users WHERE Email=$1 and Password=$2 and User_type=$3;", + [Email, Password, User_type] + ); + } catch (err) { + console.log(err); + } + if (userExists.rowCount == 1) { + res.status(200).send(userExists.rows[0]); + } else { + res.status(500).send("User does not Exists"); + } +}; diff --git a/backend/controllers/signUp.controller.js b/backend/controllers/signUp.controller.js deleted file mode 100644 index ea3dfb1..0000000 --- a/backend/controllers/signUp.controller.js +++ /dev/null @@ -1,49 +0,0 @@ -import client from "../db.js" -// import query from "../query.js" -export const createUser = async (req, res) => { - const { Fname, Lname, email, password } = req.body; - let exists; - try { - exists = await client.query( - "Select * from User_data where User_data.email=$1", - [email] - ); - } catch (err) { - console.log(err); - } - if (exists.rowCount != 0) { - res.status(500).send( - "Email is already under use . Try Sign in instead " - ); - } else { - let newUser; - try { - newUser = await client.query( - "INSERT INTO User_data(Fname, Lname, Email, Password) VALUES ($1,$2,$3,$4);", - [Fname, Lname, email, password] - ); - res.status(200).send("User has been created"); - } catch (err) { - console.log(err); - } - } -}; - -export const logInUser = async (req, res) => { - const { email, password } = req.body; - let userExists; - try { - userExists = await client.query( - "select User_data.User_id from User_data WHERE Email=$1 and Password=$2;", - [email, password] - ); - } catch (err) { - console.log(err); - } - if (userExists.rowCount == 1) { - console.log(userExists.rows); - res.status(200).send(userExists.rows[0]); - } else { - res.status(500).send("user not exist"); - } -}; diff --git a/backend/db.js b/backend/db.js index 56143b5..14a4da5 100644 --- a/backend/db.js +++ b/backend/db.js @@ -1,6 +1,6 @@ import pg from 'pg'; var conString = - "postgres://btneohyg:DK6Bkm0ePKGblH86-DJmFFQ-TLfCGlzH@trumpet.db.elephantsql.com/btneohyg"; + "postgres://qqaqecoz:gmSfPJuIGEELe4n1MxZjB9fRN9I2Dszp@trumpet.db.elephantsql.com/qqaqecoz"; var client = new pg.Client(conString); client.connect(function (err) { if (err) { diff --git a/backend/package.json b/backend/package.json index 8a3b3f1..86cae06 100644 --- a/backend/package.json +++ b/backend/package.json @@ -2,6 +2,7 @@ "name": "backend", "version": "1.0.0", "description": "", + "type": "module", "main": "db.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -15,4 +16,5 @@ "express": "^4.18.2", "pg": "^8.11.1" } + } diff --git a/backend/routes/Customer.js b/backend/routes/Customer.js deleted file mode 100644 index 0848510..0000000 --- a/backend/routes/Customer.js +++ /dev/null @@ -1,18 +0,0 @@ -import express from "express"; -import { - createQuiz, - addQuestion, - viewQuestions, - viewQuizzes, - deleteQuiz, -} from "../controllers/quizAdmin.controller.js"; - -const router = express.Router(); - -router.post("/createquiz", createQuiz); -router.post("/addquestion", addQuestion); -router.post("/viewquestions", viewQuestions); // testing purpose -router.post("/viewquizzes", viewQuizzes); -router.post("/deletequiz", deleteQuiz); - -export default router; diff --git a/backend/routes/Customer_route.js b/backend/routes/Customer_route.js new file mode 100644 index 0000000..981ba64 --- /dev/null +++ b/backend/routes/Customer_route.js @@ -0,0 +1,5 @@ +import express from "express"; +const router = express.Router(); + + +export default router \ No newline at end of file diff --git a/backend/routes/Delivery_boy.js b/backend/routes/Delivery_boy.js deleted file mode 100644 index b1756b6..0000000 --- a/backend/routes/Delivery_boy.js +++ /dev/null @@ -1,10 +0,0 @@ -import express from "express"; -import { startQuiz,seeLeaderboard,endQuiz } from "../controllers/attemptQuiz.controller.js"; - -const router = express.Router(); - -router.post("/startQuiz", startQuiz); -router.post("/seeLeaderboard", seeLeaderboard); -router.post("/endQuiz", endQuiz); - -export default router; \ No newline at end of file diff --git a/backend/routes/Delivery_route.js b/backend/routes/Delivery_route.js new file mode 100644 index 0000000..981ba64 --- /dev/null +++ b/backend/routes/Delivery_route.js @@ -0,0 +1,5 @@ +import express from "express"; +const router = express.Router(); + + +export default router \ No newline at end of file diff --git a/backend/routes/Mess_owner_route.js b/backend/routes/Mess_owner_route.js new file mode 100644 index 0000000..981ba64 --- /dev/null +++ b/backend/routes/Mess_owner_route.js @@ -0,0 +1,5 @@ +import express from "express"; +const router = express.Router(); + + +export default router \ No newline at end of file diff --git a/backend/routes/Sign_routes.js b/backend/routes/Sign_routes.js new file mode 100644 index 0000000..5b40717 --- /dev/null +++ b/backend/routes/Sign_routes.js @@ -0,0 +1,9 @@ +import express from "express"; +import { createUser, logInUser } from "../controllers/Sign_controller.js"; + +const router = express.Router(); + +router.post("/signUp", createUser); +router.post("/login", logInUser); + +export default router; diff --git a/backend/routes/signUp.js b/backend/routes/signUp.js deleted file mode 100644 index f32552b..0000000 --- a/backend/routes/signUp.js +++ /dev/null @@ -1,9 +0,0 @@ -import express from "express"; -import { createUser, logInUser } from "../controllers/signUp.controller.js"; -//const {createUser, logInUser} = require('../controllers/signUp.controller.js'); -const router = express.Router(); - -router.post("/signUp", createUser); -router.post("/login", logInUser); - -export default router; \ No newline at end of file diff --git a/backend/server.js b/backend/server.js index 796fc01..7507156 100644 --- a/backend/server.js +++ b/backend/server.js @@ -2,8 +2,10 @@ import express from "express"; import bodyParser from "body-parser"; import cors from "cors"; -// import from "./routes/.js"; -// import from "./routes/.js"; +import Sign_routes from "./routes/Sign_routes.js" +import Customer_route from "./routes/Customer_route.js" +import Delivery_route from "./routes/Delivery_route.js" +import Mess_owner_route from "./routes/Mess_owner_route.js" const app = express(); @@ -18,8 +20,12 @@ app.use( }) ); -app.use("/auth", signUpRoutes); -app.use("/quizAdmin", quizAdminRoutes); +app.use("/auth", Sign_routes); +app.use("/Customer", Customer_route); +app.use("/Mess_owner",Mess_owner_route) +app.use("/Delivery_boy", Delivery_route); +// app.use("/test", (req,res)=>{console.log(665);res.send("hellppppp")}); + const port = 5000; app.listen(port, () => { console.log(`Server is listening on port ${port}`); diff --git a/frontend/src/App.js b/frontend/src/App.js index d32dbf0..e96deac 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -4,13 +4,11 @@ import Login from "./Components/Login"; import { Routes, BrowserRouter, Route } from "react-router-dom"; import SignUp from "./Components/SignUp"; import MessOwnerDashboard from "./Components/MessOwnerDashboard"; -// import Subscriber from "./Components/Subscriber" import Profile from "./Components/Profile"; function App() { return (
- } /> @@ -20,7 +18,8 @@ function App() { }/> -
- ); + + ) } -export default App; + +export default App diff --git a/models/.env b/models/.env new file mode 100644 index 0000000..0626746 --- /dev/null +++ b/models/.env @@ -0,0 +1 @@ +REACT_APP_GOOGLE_MAPS_API_KEY=AIzaSyA8KexQ2jSPwy6uXltDxLJ3-8ShddPGGG8 \ No newline at end of file diff --git a/models/ddlnew.sql b/models/ddlnew.sql new file mode 100644 index 0000000..94234e2 --- /dev/null +++ b/models/ddlnew.sql @@ -0,0 +1,73 @@ +drop table if exists Users; +create table Users( + User_id bigserial, + Fname varchar(20) not null, + Lname varchar(20) not null, + Phone_num char(10) check (length(Phone_Num)=10), + Email varchar(30) not null, + Password varchar(20) not null, + User_address varchar(50) not null, + User_type integer, + primary key (User_id) +); + +INSERT INTO Users(Fname, Lname, Phone_Num, Email, Password, User_address, User_type) VALUES('Harsh','Saboo',8555465236,'hs@gmail.com','Saboo','46, xyz Nagar', 1); +INSERT INTO Users(Fname, Lname, Phone_Num, Email, Password, User_address, User_type) VALUES('Sidharth','Jain',4526366236,'sj@gmail.com','Jain','55, Jain Colony', 1); +INSERT INTO Users(Fname, Lname, Phone_Num, Email, Password, User_address, User_type) VALUES('Aniket', 'Kano',8319159263, 'ak@gmail.com','1234521','new jain restroA', 2); +INSERT INTO Users(Fname, Lname, Phone_Num, Email, Password, User_address, User_type) VALUES('pandyey', 'Kash',8319159264, 'pk@gmail.com','1234522','new jain restroP', 2); +INSERT INTO Users(Fname, Lname, Phone_Num, Email, Password, User_address, User_type) VALUES('Chirag', 'ragu',8319159265, 'cr@gmail.com','1234531','new jain restroC', 3); +INSERT INTO Users(Fname, Lname, Phone_Num, Email, Password, User_address, User_type) VALUES('shubham', 'shukla',8319159265, 'ss@gmail.com','1234532','new jain restroC', 3); + +drop table if exists Mess; +create table Mess( + Mess_id bigserial, + Mess_name varchar(20) not null, + Mess_address varchar(50) not null, + Subscription_price integer, + Phone_Num char(10) check (length(Phone_Num)=10), + Rating integer, + Tiffin_details varchar(50) not null, + Mess_owner_id bigserial, + primary key (Mess_id), + foreign key (Mess_owner_id) references Users +); + +INSERT INTO Mess(Mess_name, Mess_address, Subscription_price,Phone_Num,Rating,Tiffin_details,Mess_owner_id) VALUES('malwa mill mess ak', 3000,8823019288,4,'dalchawal aloo sabji',3 ); +INSERT INTO Mess(Mess_name, Mess_address, Subscription_price,Phone_Num,Rating,Tiffin_details,Mess_owner_id) VALUES('malwa mill mess hp', 3000,8823019289,3,'dalchawal sabji',4 ); + + +drop table if exists Subscription; +create table Subscription( + Customer_id bigserial, + Mess_id bigserial, + Subscription_date date, + Subscription_validity integer, + primary key(Mess_id,Customer_id), + foreign key (Customer_id) references Users, + foreign key (Mess_id) references Mess +); + +INSERT INTO Subscription(Customer_id,Mess_id,Subscription_date,Subscription_validity) VALUES(5,1,'2023-08-17',2); +INSERT INTO Subscription(Customer_id,Mess_id,Subscription_date,Subscription_validity) VALUES(6,2,'2023-04-17',6); + +drop table if exists Delivers; +create table Delivers( + Boy_id bigserial, + Mess_id bigserial, + primary key(Mess_id,Boy_id), + foreign key (Boy_id) references Users, + foreign key (Mess_id) references Mess +); + +INSERT INTO Delivers(Boy_id,Mess_id) VALUES(5,1); +INSERT INTO Delivers(Boy_id,Mess_id) VALUES(6,2); + + +-- user_id fname lname phone_num email password user_address user_type +-- 1 Harsh Saboo 8555465236 hs@gmail.com Saboo 46, xyz Nagar 1 +-- 2 Sidharth Jain 4526366236 sj@gmail.com Jain 55, Jain Colony 1 +-- 3 Aniket Kano 8319159263 ak@gmail.com 1234521 new jain restroA 2 +-- 4 pandyey Kash 8319159264 pk@gmail.com 1234522 new jain restroP 2 +-- 5 Chirag ragu 8319159265 cr@gmail.com 1234531 new jain restroC 3 +-- 6 shubham shukla 8319159265 ss@gmail.com 1234532 new jain restroC 3 +-- 7 gautam patidar 8319159235 gp@gmail.com 1234523 gautam mess restroC 2 diff --git a/models/design.css b/models/design.css new file mode 100644 index 0000000..2704f78 --- /dev/null +++ b/models/design.css @@ -0,0 +1,77 @@ + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + + +body { + font-family: Arial, sans-serif; + background-color: #f5f5f5; +} + +header { + background-color: #333; + color: #fff; + padding: 20px; +} + +header h1 { + font-size: 24px; +} + + +nav ul { + list-style: none; +} + +nav ul li { + display: inline; + margin-right: 20px; +} + +nav ul li a { + text-decoration: none; + color: #333; + font-weight: bold; +} + + +main { + max-width: 800px; + margin: 0 auto; + padding: 20px; + background-color: #fff; +} + + +footer { + text-align: center; + padding: 10px; + background-color: #333; + color: #fff; +} + + +@media (max-width: 768px) { + header { + padding: 10px; + } + + header h1 { + font-size: 20px; + } + + nav ul li { + margin-right: 10px; + } + + main { + padding: 10px; + } + + footer { + padding: 5px; + } +} diff --git a/models/partnerassign b/models/partnerassign new file mode 100644 index 0000000..23a2236 --- /dev/null +++ b/models/partnerassign @@ -0,0 +1,139 @@ + import { + useJsApiLoader, + GoogleMap, + Marker, + Autocomplete, + DirectionsRenderer, + } from '@react-google-maps/api' + import { useRef, useState } from 'react' + + const center = { lat: 48.8584, lng: 2.2945 } + + function App() { + const { isLoaded } = useJsApiLoader({ + googleMapsApiKey: process.env.REACT_APP_GOOGLE_MAPS_API_KEY, + libraries: ['places'], + }) + + const [map, setMap] = useState(/** @type google.maps.Map */ (null)) + const [directionsResponse, setDirectionsResponse] = useState(null) + const [distance, setDistance] = useState('') + const [duration, setDuration] = useState('') + + /** @type React.MutableRefObject */ + const originRef = useRef() + /** @type React.MutableRefObject */ + const destiantionRef = useRef() + + if (!isLoaded) { + return + } + + async function calculateRoute() { + if (originRef.current.value === '' || destiantionRef.current.value === '') { + return + } + // eslint-disable-next-line no-undef + const directionsService = new google.maps.DirectionsService() + const results = await directionsService.route({ + origin: originRef.current.value, + destination: destiantionRef.current.value, + // eslint-disable-next-line no-undef + travelMode: google.maps.TravelMode.DRIVING, + }) + setDirectionsResponse(results) + setDistance(results.routes[0].legs[0].distance.text) + setDuration(results.routes[0].legs[0].duration.text) + } + + function clearRoute() { + setDirectionsResponse(null) + setDistance('') + setDuration('') + originRef.current.value = '' + destiantionRef.current.value = '' + } + + return ( + + + {/* Google Map Box */} + setMap(map)} + > + + {directionsResponse && ( + + )} + + + + + + + + + + + + + + + + + + } + onClick={clearRoute} + /> + + + + Distance: {distance} + Duration: {duration} + } + isRound + onClick={() => { + map.panTo(center) + map.setZoom(15) + }} + /> + + + + ) + } + + export default App diff --git a/models/table_Deliver b/models/table_Deliver new file mode 100644 index 0000000..fd80a41 --- /dev/null +++ b/models/table_Deliver @@ -0,0 +1,8 @@ +table Delivers + +Delivers + + +boy_id mess_id +5 1 +6 2 diff --git a/models/table_Mess b/models/table_Mess new file mode 100644 index 0000000..6be5ade --- /dev/null +++ b/models/table_Mess @@ -0,0 +1,7 @@ +Select * from Mess +Mess table + +mess_id mess_address subscription_price phone_num rating tiffin_details mess_owner_id +1 malwa mill mess ak 3000 8823019288 4 dalchawal aloo sabji 3 +2 malwa mill mess hp 3000 8823019289 3 dalchawal sabji 4 +3 patli gali katilana nazar 4000 8823019279 5 dalcawala sabji rooti 7 diff --git a/models/table_user b/models/table_user new file mode 100644 index 0000000..3d6cbfb --- /dev/null +++ b/models/table_user @@ -0,0 +1,13 @@ +-- users table +user_id fname lname phone_num email password user_address user_type +1 Harsh Saboo 8555465236 hs@gmail.com Saboo 46, xyz Nagar 1 +2 Sidharth Jain 4526366236 sj@gmail.com Jain 55, Jain Colony 1 +3 Aniket Kano 8319159263 ak@gmail.com 1234521 new jain restroA 2 +4 pandyey Kash 8319159264 pk@gmail.com 1234522 new jain restroP 2 +5 Chirag ragu 8319159265 cr@gmail.com 1234531 new jain restroC 3 +6 shubham shukla 8319159265 ss@gmail.com 1234532 new jain restroC 3 +7 gautam patidar 8319159235 gp@gmail.com 1234523 gautam mess restroC 2 + + +Select * from Users +. user table of all type of users