-- https://www.phpmyadmin.net/
--
-- 생성 시간: 25-03-12 11:10
-- 서버 버전: 10.11.6-MariaDB-0+deb12u1
-- PHP 버전: 8.2.20

START TRANSACTION;



--
-- 데이터베이스: `backuptable`
--

-- --------------------------------------------------------

--
-- 테이블 구조 `contact`
--

CREATE TABLE `contact` (
  `Id` int(11) NOT NULL,
  `Name` varchar(250) NOT NULL,
  `Email` varchar(250) NOT NULL,
  `Mobile` varchar(250) NOT NULL,
  `Subject` varchar(250) NOT NULL,
  `Message` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- 테이블의 덤프 데이터 `contact`
--

INSERT INTO `contact` (`Id`, `Name`, `Email`, `Mobile`, `Subject`, `Message`) VALUES
(3, 'BIRJU KUMAR', 'ckj40856@gmail.com', '8903079750', 'asd', 'asdasdasd'),
(4, 'CHANDAN KUMAR', 'ckj40856@gmail.com', '9487810674', 'asd', 'hfgdsfsx'),
(10, 'kskang3', 'kskang2@gmail.com', '01052545944', 'test1', 'test1 contents'),
(11, 'kskang3', 'kskang2@gmail.com', '01052545944', 'test1', 'test1 contents');

-- --------------------------------------------------------

--
-- 테이블 구조 `food`
--

CREATE TABLE `food` (
  `F_ID` int(30) NOT NULL,
  `name` varchar(30) NOT NULL,
  `choice1` varchar(31) DEFAULT '0',
  `choice2` varchar(31) DEFAULT '0',
  `choice3` varchar(31) DEFAULT '0',
  `price` varchar(30) NOT NULL,
  `description` varchar(200) DEFAULT NULL,
  `R_ID` int(30) NOT NULL,
  `display` int(11) DEFAULT 777,
  `images_path` varchar(200) DEFAULT NULL,
  `options` varchar(10) NOT NULL DEFAULT 'ENABLE'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- 테이블의 덤프 데이터 `food`
--

INSERT INTO `food` (`F_ID`, `name`, `choice1`, `choice2`, `choice3`, `price`, `description`, `R_ID`, `display`, `images_path`, `options`) VALUES
(69, 'Coffee', '0', '0', '0', '25', 'concentrated coffee', 2, 120, 'images/coffee.jpg', 'DISABLE'),
(70, 'Tea', '0', '0', '0', '20', 'The simple elixir', 2, 130, 'images/tea.jpg', 'DISABLE'),
(77, 'Pizza', '0', '0', '0', '200', 'Pure', 2, 110, 'images/Pizza.jpg', 'DISABLE'),
(78, 'French Fries', '0', '0', '0', '75', 'Pure Veg and Tasty.', 2, 140, 'images/frenchfries.jpg', 'DISABLE'),
(119, '수제비', '', '', '', '7500', '', 9, 30, 'images/1050x700d.png', 'ENABLE'),
(120, '칼국수', '', '', '', '7000', '', 9, 10, 'images/1050x700a.png', 'ENABLE'),
(123, '공기밥', '', '', '', '1000', '', 9, 60, 'images/1050x700f.png', 'ENABLE'),
(132, '김치칼국수', '', '', '', '7500', '', 9, 20, 'images/1050x700c.png', 'ENABLE'),
(133, '만두(5개)', '고기', '김치', '섞어', '7500', '', 9, 50, 'images/1050x700e.png', 'ENABLE'),
(134, '음료', '콜라', '사이다', '', '1500', '', 9, 70, 'images/1050x700g.png', 'ENABLE'),
(167, '짜장면', '보통', '곱배기', '', '7000', '', 6, 777, 'images/wine2a.png', 'ENABLE'),
(170, '김치수제비', '', '', '', '8000', '', 9, 40, 'images/food22.png', 'ENABLE'),
(173, '3', '3', '3', '3', '3', '3', 9, 777, 'images/wine2a.png', 'ENABLE'),
(175, 'backup table', '1', '1', '1', '1', '', 9, 777, 'images/', 'ENABLE');

-- --------------------------------------------------------

--
-- 테이블 구조 `orders`
--

CREATE TABLE `orders` (
  `order_ID` int(30) NOT NULL,
  `order_number` varchar(11) DEFAULT NULL,
  `foodname` varchar(30) NOT NULL,
  `choice` varchar(31) DEFAULT NULL,
  `status` varchar(11) DEFAULT '0',
  `price` int(30) NOT NULL,
  `quantity` int(30) NOT NULL,
  `order_date` varchar(31) NOT NULL,
  `username` varchar(30) NOT NULL,
  `contact` varchar(31) DEFAULT NULL,
  `F_ID` int(30) NOT NULL,
  `R_ID` int(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- 테이블의 덤프 데이터 `orders`
--

INSERT INTO `orders` (`order_ID`, `order_number`, `foodname`, `choice`, `status`, `price`, `quantity`, `order_date`, `username`, `contact`, `F_ID`, `R_ID`) VALUES
(413, '2153-264', '칼국수', '매운', '0', 7000, 1, '27日 21:53', 'test', NULL, 120, 9),
(414, '2153-264', '음료', '사이다', '0', 1500, 1, '27日 21:53', 'test', NULL, 134, 9),
(427, '1558-278', '만두(5개)', '김치', '0', 7500, 1, '28日 15:58', 'test', NULL, 133, 9),
(429, '1143-557', '칼국수', '120보통', '0', 7000, 1, '29日 11:43', 'test', NULL, 120, 9),
(446, '1605-197', '칼국수', '120매운', '0', 7000, 1, '29日 16:05', 'test', NULL, 120, 9),
(447, '1605-197', '칼국수', '120보통', '0', 7000, 1, '29日 16:05', 'test', NULL, 120, 9),
(448, '1606-388', '만두(5개)', '133고기', '0', 7500, 1, '29日 16:06', 'test', NULL, 133, 9),
(449, '1606-479', '음료', '134콜라', '0', 1500, 1, '29日 16:06', 'test', NULL, 134, 9),
(450, '1607-220', '수제비', '119', '0', 7500, 1, '29日 16:07', 'test', NULL, 119, 9),
(543, '0820-435', '김치칼국수', '132', '0', 7500, 1, '31日 08:20', 'test', '01052545944', 132, 9),
(544, '0933-516', '칼국수', '120보통', '0', 7000, 1, '31日 09:33', 'test', '01052545944', 120, 9),
(545, '0933-516', '수제비', '119보통', '0', 7500, 1, '31日 09:33', 'test', '01052545944', 119, 9),
(549, '0709-111', '칼국수', '120매움', '0', 7000, 1, '01日 07:09', 'test', NULL, 120, 9),
(550, '0709-111', '음료', '134사이다', '0', 1500, 1, '01日 07:09', 'test', NULL, 134, 9),
(551, '0709-598', '칼국수', '120보통', '0', 7000, 1, '01日 07:09', 'test', '01052545944', 120, 9),
(552, '0714-239', '김치칼국수', '120', '0', 7500, 1, '01日 07:14', 'test', '01052545944', 132, 9),
(553, '1002-282', '칼국수', '120매움', '0', 7000, 1, '01日 10:02', 'test', NULL, 120, 9),
(554, '1002-282', '김치칼국수', '132', '0', 7500, 1, '01日 10:02', 'test', NULL, 132, 9),
(555, '1234-500', '수제비', '120매움', '0', 7500, 1, '01日 12:34', 'test', '', 119, 9),
(556, '1615-041', '칼국수', '120보통', '0', 7000, 1, '01日 16:15', 'test', '01052545944', 120, 9),
(557, '1618-532', '칼국수', '120보통', '0', 7000, 1, '01日 16:18', 'test', '01052545944', 120, 9),
(558, '1618-532', '김치칼국수', '120', '0', 7500, 1, '01日 16:18', 'test', '01052545944', 132, 9),
(559, '1621-593', '김치칼국수', '120', '0', 7500, 1, '01日 16:21', 'test', '01052545944', 132, 9),
(560, '1621-593', '만두(5개)', '120김치', '0', 7500, 1, '01日 16:21', 'test', '01052545944', 133, 9),
(561, '1044-413', '김치칼국수', '132', '0', 7500, 1, '02日 10:44', 'test', NULL, 132, 9),
(562, '1045-554', '김치칼국수', '132', '0', 7500, 1, '02日 10:45', 'test', NULL, 132, 9),
(563, '1243-146', '칼국수', '120보통', '0', 7000, 1, '02日 12:43', 'test', NULL, 120, 9),
(564, '1243-146', '김치칼국수', '132', '0', 7500, 1, '02日 12:43', 'test', NULL, 132, 9),
(565, '1243-308', '김치칼국수', '132', '0', 7500, 1, '02日 12:43', 'test', NULL, 132, 9),
(566, '1349-479', '김치수제비', '170', '0', 8000, 1, '02日 13:49', 'test', NULL, 170, 9),
(568, '1711-054', '칼국수', '120보통', '1', 7000, 1, '02日 17:11', 'test', '01052545944', 120, 9),
(569, '1711-125', '김치칼국수', '132', '2', 7500, 1, '02日 17:11', 'test', '01052545944', 132, 9),
(571, '1406-077', '칼국수', '120', '0', 7000, 1, '04日 14:06', 'test', '01052545944', 120, 9),
(572, '1406-077', '수제비', '119', '0', 7500, 1, '04日 14:06', 'test', '01052545944', 119, 9),
(573, '1407-188', '칼국수', '120', '0', 7000, 1, '04日 14:07', 'test', '01052545944', 120, 9),
(574, '1408-159', '수제비', '119', '0', 7500, 1, '04日 14:08', 'test', '01052545944', 119, 9),
(575, '1634-355', '칼국수', '120', '0', 7000, 1, '04日 16:34', 'test', '01052545944', 120, 9),
(576, '1634-355', '음료', '134콜라', '0', 1500, 1, '04日 16:34', 'test', '01052545944', 134, 9),
(577, '1634-355', '만두(5개)', '133김치', '0', 7500, 1, '04日 16:34', 'test', '01052545944', 133, 9);

-- --------------------------------------------------------

--
-- 테이블 구조 `restaurants`
--

CREATE TABLE `restaurants` (
  `R_ID` int(30) NOT NULL,
  `name` varchar(30) NOT NULL,
  `email` varchar(30) NOT NULL,
  `contact` varchar(30) NOT NULL,
  `address` varchar(50) NOT NULL,
  `M_ID` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- 테이블의 덤프 데이터 `restaurants`
--

INSERT INTO `restaurants` (`R_ID`, `name`, `email`, `contact`, `address`, `M_ID`) VALUES
(1, 'Nikhil\'s Restaurant', 'nikhil@restaurant.com', '7998562145', 'Karnataka', 'aminnikhil073'),
(2, 'Roshan\'s Restaurant', 'roshan@restaurant.com', '9887546821', 'Bihar', 'roshanraj07'),
(3, 'Aditi\'s Restaurant', 'aditi@restaurant.com', '7778564231', 'Goa', 'aditi068'),
(4, 'Food Exploria', 'ckj40856@gmail.com', '09487810674', 'C:\\xampp\\htdocs\\FoodExploria-master\\images/coffee.', 'ckumar'),
(6, 'Le Cafe', 'lecafepondi234@gmail.com', '9443369040', 'Pondicherry,rock beach Near,Le cafe', 'dhiraj'),
(7, 'ksrestaurant', 'kskang2@gmail.com', '1122223333', 'san', 'kskang'),
(9, 'Noodle', 'kskang2@gmail.com', '01052545944', 'Pankyo', 'admin');

--
-- 덤프된 테이블의 인덱스
--

--
-- 테이블의 인덱스 `contact`
--
ALTER TABLE `contact`
  ADD PRIMARY KEY (`Id`);

--
-- 테이블의 인덱스 `food`
--
ALTER TABLE `food`
  ADD PRIMARY KEY (`F_ID`,`R_ID`),
  ADD KEY `R_ID` (`R_ID`);

--
-- 테이블의 인덱스 `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`order_ID`),
  ADD KEY `F_ID` (`F_ID`),
  ADD KEY `R_ID` (`R_ID`),
  ADD KEY `orders_ibfk_2` (`username`);

--
-- 테이블의 인덱스 `restaurants`
--
ALTER TABLE `restaurants`
  ADD PRIMARY KEY (`R_ID`),
  ADD UNIQUE KEY `M_ID_2` (`M_ID`),
  ADD KEY `M_ID` (`M_ID`);

--
-- 덤프된 테이블의 AUTO_INCREMENT
--

--
-- 테이블의 AUTO_INCREMENT `food`
--
ALTER TABLE `food`
  MODIFY `F_ID` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=176;

--
-- 테이블의 AUTO_INCREMENT `orders`
--
ALTER TABLE `orders`
  MODIFY `order_ID` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=578;

--
-- 테이블의 AUTO_INCREMENT `restaurants`
--
ALTER TABLE `restaurants`
  MODIFY `R_ID` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- 덤프된 테이블의 제약사항
--

--
-- 테이블의 제약사항 `food`
--
ALTER TABLE `food`
  ADD CONSTRAINT `food_ibfk_1` FOREIGN KEY (`R_ID`) REFERENCES `restaurants` (`R_ID`);

--
-- 테이블의 제약사항 `orders`
--
ALTER TABLE `orders`
  ADD CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`F_ID`) REFERENCES `food` (`F_ID`),
  ADD CONSTRAINT `orders_ibfk_2` FOREIGN KEY (`username`) REFERENCES `customer` (`username`),
  ADD CONSTRAINT `orders_ibfk_3` FOREIGN KEY (`R_ID`) REFERENCES `restaurants` (`R_ID`);

--
-- 테이블의 제약사항 `restaurants`
--
ALTER TABLE `restaurants`
  ADD CONSTRAINT `restaurants_ibfk_1` FOREIGN KEY (`M_ID`) REFERENCES `manager` (`username`);
COMMIT;

