From 035755e202056ac519622072dc4515acef716e07 Mon Sep 17 00:00:00 2001 From: Mugdha Danda <43558108+Mugdha12@users.noreply.github.com> Date: Tue, 21 Apr 2020 13:10:05 -0500 Subject: [PATCH] Updated BackupFile --- AutoGarconBackupDB.sql | 438 ++++++++++++++++++++++++++++------------- 1 file changed, 304 insertions(+), 134 deletions(-) diff --git a/AutoGarconBackupDB.sql b/AutoGarconBackupDB.sql index 58263fa..7af1dc2 100644 --- a/AutoGarconBackupDB.sql +++ b/AutoGarconBackupDB.sql @@ -41,7 +41,7 @@ CREATE TABLE `ItemHasOptions` ( KEY `ItemHasOptions_ibfk_2_idx` (`optionID`), CONSTRAINT `ItemHasOptions_ibfk_1` FOREIGN KEY (`itemID`) REFERENCES `MenuItem` (`itemID`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `ItemHasOptions_ibfk_2` FOREIGN KEY (`optionID`) REFERENCES `Options` (`optionID`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -50,40 +50,10 @@ CREATE TABLE `ItemHasOptions` ( LOCK TABLES `ItemHasOptions` WRITE; /*!40000 ALTER TABLE `ItemHasOptions` DISABLE KEYS */; -INSERT INTO `ItemHasOptions` VALUES (1,27,1),(2,27,2),(3,27,3),(4,28,1),(5,28,2),(6,28,3),(7,29,1),(8,29,2),(9,29,3),(10,30,1),(11,30,2),(12,30,3); +INSERT INTO `ItemHasOptions` VALUES (1,27,1),(2,27,2),(3,27,3),(4,28,1),(5,28,2),(6,28,3),(7,29,1),(8,29,2),(9,29,3),(10,30,1),(11,30,2),(12,30,3),(13,118,5),(14,120,5); /*!40000 ALTER TABLE `ItemHasOptions` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `ItemHasSides` --- - -DROP TABLE IF EXISTS `ItemHasSides`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `ItemHasSides` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `menuItemID` int(11) NOT NULL, - `sideItemID` int(11) NOT NULL, - `additionalPrice` decimal(10,2) DEFAULT '0.00', - PRIMARY KEY (`id`), - KEY `menuItemID_index` (`menuItemID`), - KEY `sideItemID` (`sideItemID`), - CONSTRAINT `ItemHasSides_ibfk_1` FOREIGN KEY (`menuItemID`) REFERENCES `MenuItem` (`itemID`) ON DELETE CASCADE, - CONSTRAINT `ItemHasSides_ibfk_2` FOREIGN KEY (`sideItemID`) REFERENCES `MenuItem` (`itemID`) ON DELETE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `ItemHasSides` --- - -LOCK TABLES `ItemHasSides` WRITE; -/*!40000 ALTER TABLE `ItemHasSides` DISABLE KEYS */; -INSERT INTO `ItemHasSides` VALUES (1,35,56,0.00),(2,35,57,0.00),(3,35,58,1.50),(4,35,59,2.50),(5,27,56,0.00),(6,27,57,0.00),(7,28,56,0.00),(8,28,57,0.00),(9,29,58,1.50),(10,29,59,2.50),(11,30,56,0.00),(12,30,57,0.00),(13,31,56,0.00),(14,31,57,0.00),(15,32,56,0.00),(16,32,57,0.00),(17,33,56,0.00),(18,33,57,0.00),(19,34,56,0.00),(20,34,57,0.00); -/*!40000 ALTER TABLE `ItemHasSides` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `Menu` -- @@ -100,7 +70,7 @@ CREATE TABLE `Menu` ( UNIQUE KEY `menuID_UNIQUE` (`menuID`), KEY `restaurantId_idx` (`restaurantID`), CONSTRAINT `restaurantId` FOREIGN KEY (`restaurantID`) REFERENCES `Restaurant` (`restaurantId`) ON DELETE RESTRICT ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -109,7 +79,7 @@ CREATE TABLE `Menu` ( LOCK TABLES `Menu` WRITE; /*!40000 ALTER TABLE `Menu` DISABLE KEYS */; -INSERT INTO `Menu` VALUES (7,1,'Red Cow Lunch',5),(8,1,'Red Cow Happy Hour',5),(9,1,'Scooters Menu',1),(10,1,'Chipotle Menu',3),(11,1,'Khao Hom Lunch',2),(12,1,'Khao Hom Dinner',2),(13,1,'Roti Lunch Menu',2),(14,1,'Roti Dinner Menu',2),(15,1,'Roti Happy Hour Selections',2),(32,0,'Burgers',5),(48,0,'Dinner',5),(49,0,'Dinner',5); +INSERT INTO `Menu` VALUES (7,1,'Red Cow Lunch',5),(8,1,'Red Cow Happy Hour',5),(9,1,'Scooters Menu',1),(10,1,'Chipotle Menu',3),(11,1,'Khao Hom Lunch',2),(12,1,'Khao Hom Dinner',2),(13,1,'Roti Lunch Menu',2),(14,1,'Roti Dinner Menu',2),(15,1,'Roti Happy Hour Selections',2),(32,0,'Burgers',5),(48,0,'Dinner',5),(49,0,'Dinner',5),(51,0,'good menu',5),(52,1,'Lunch',12),(53,1,'Lunch',13); /*!40000 ALTER TABLE `Menu` ENABLE KEYS */; UNLOCK TABLES; @@ -130,7 +100,7 @@ CREATE TABLE `MenuContains` ( KEY `menuItemID_idx` (`menuItemID`), CONSTRAINT `MenuContains_ibfk_1` FOREIGN KEY (`menuID`) REFERENCES `Menu` (`menuID`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `MenuContains_ibfk_2` FOREIGN KEY (`menuItemID`) REFERENCES `MenuItem` (`itemID`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -139,7 +109,7 @@ CREATE TABLE `MenuContains` ( LOCK TABLES `MenuContains` WRITE; /*!40000 ALTER TABLE `MenuContains` DISABLE KEYS */; -INSERT INTO `MenuContains` VALUES (7,51,11.99,44),(7,54,6.50,47),(7,55,7.00,48),(8,1,4.50,49),(8,2,5.50,50),(8,3,5.25,51),(8,4,5.00,52),(8,5,5.00,53),(48,75,13.99,69),(48,76,11.29,70),(48,77,7.49,71),(48,78,8.99,72),(48,79,10.79,73),(48,80,10.99,74),(48,81,11.49,75),(48,82,15.29,76),(48,83,16.29,77),(48,84,14.99,78),(48,85,12.99,79),(48,86,13.99,80),(48,87,11.99,81),(48,88,12.99,82),(48,89,12.29,83),(48,90,15.99,84),(48,91,11.59,85),(48,92,11.59,86),(48,93,12.59,87),(48,94,11.89,88),(48,95,11.89,89),(49,96,13.99,90),(49,97,11.29,91),(49,98,7.49,92),(49,99,8.99,93),(49,100,10.79,94),(49,101,10.99,95),(49,102,11.49,96),(49,103,15.29,97),(49,104,16.29,98),(49,105,14.99,99),(49,106,12.99,100),(49,107,13.99,101),(49,108,11.99,102),(49,109,12.99,103),(49,110,12.29,104),(49,111,15.99,105),(49,112,11.59,106),(49,113,11.59,107),(49,114,12.59,108),(49,115,11.89,109),(49,116,11.89,110); +INSERT INTO `MenuContains` VALUES (7,51,11.99,44),(7,54,6.50,47),(7,55,7.00,48),(8,1,4.50,49),(8,2,5.50,50),(8,3,5.25,51),(8,4,5.00,52),(8,5,5.00,53),(48,75,13.99,69),(48,76,11.29,70),(48,77,7.49,71),(48,78,8.99,72),(48,79,10.79,73),(48,80,10.99,74),(48,81,11.49,75),(48,82,15.29,76),(48,83,16.29,77),(48,84,14.99,78),(48,85,12.99,79),(48,86,13.99,80),(48,87,11.99,81),(48,88,12.99,82),(48,89,12.29,83),(48,90,15.99,84),(48,91,11.59,85),(48,92,11.59,86),(48,93,12.59,87),(48,94,11.89,88),(48,95,11.89,89),(49,96,13.99,90),(49,97,11.29,91),(49,98,7.49,92),(49,99,8.99,93),(49,100,10.79,94),(49,101,10.99,95),(49,102,11.49,96),(49,103,15.29,97),(49,104,16.29,98),(49,105,14.99,99),(49,106,12.99,100),(49,107,13.99,101),(49,108,11.99,102),(49,109,12.99,103),(49,110,12.29,104),(49,111,15.99,105),(49,112,11.59,106),(49,113,11.59,107),(49,114,12.59,108),(49,115,11.89,109),(49,116,11.89,110),(52,118,8.99,112),(52,119,10.99,113),(53,120,8.99,114),(53,121,10.99,115); /*!40000 ALTER TABLE `MenuContains` ENABLE KEYS */; UNLOCK TABLES; @@ -163,7 +133,7 @@ CREATE TABLE `MenuItem` ( `nuts` tinyint(1) NOT NULL DEFAULT '0', `soy` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`itemID`) -) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -172,7 +142,7 @@ CREATE TABLE `MenuItem` ( LOCK TABLES `MenuItem` WRITE; /*!40000 ALTER TABLE `MenuItem` DISABLE KEYS */; -INSERT INTO `MenuItem` VALUES (1,'French Fries','Crispy fries',1,400,'Appetizers',0,0,0,0,0),(2,'Traditional Tots','Classic potato tater tots',1,400,'Appetizers',0,0,0,0,0),(3,'Chicken Strips','Crispy chicken strips',1,800,'Appetizers',0,0,0,0,0),(4,'Cheese Curds','Little fried cheese balls',1,750,'Appetizers',0,0,0,0,0),(5,'Mozzarella Sticks','Good with marinara',1,750,'Appetizers',0,0,0,0,0),(6,'Grilled Cheese','Rosemary Bread with your choice of cheese',1,850,'Paninis',0,0,0,0,0),(7,'Chicken Avocado','Rosemary Bread, Chicken, Gouda, Avocado Mayo, Spinach',1,825,'Paninis',0,0,0,0,0),(8,'Curry Basil Leaved Fried Rice','Spicy*. Zesty red curry paste stir fried with Jasmine rice, egg, basil, onion, and bell peppers.\n',1,272,'Thai Fried Rice',0,0,0,0,0),(9,'Pad Thai','A staple of every Thai restaurant, Pad Thai is a stir fried rice noodle, tangy pad Thai sauce, egg, green onions, and bean sprouts served with crushed peanut and lime on the side.',1,1131,'Noodle Stir Fry',0,0,0,0,0),(10,'Rice Noodle gluten free','Gluten Free* Thai classic street noodle soup, Goid-Tiou. Just like in Thailand, you get your choice of noodle and meat in this delightful and delicious Thai spice soup. All soup is served with bean sprouts, jalapeno, and sweet basil.',1,192,'Noodle Soup',0,0,0,0,0),(11,'Thai Fried Rice','Thai Jasmine rice blended with egg, onions, tomatoes, and scallions.',1,137,'Lunch Specials',0,0,0,0,0),(12,' Red Curry','Gluten Free* *Spicy* Red curry paste, coconut milk, egg plant, bell peppers, bamboo shoots, lime leaves, and basil. Served with rice.',1,441,'Lunch Specials',0,0,0,0,0),(13,'Green Curry','Gluten Free* *Spicy* Green curry paste, coconut milk, egg plant, bell peppers, bamboo shoots, lime leaves, and basil. Served with rice.',1,310,'Lunch Specials',0,0,0,0,0),(14,'Pad Ruom Mid','Stir fried seasonal vegetables in our soy based sauce.\n',1,547,'Lunch Specials',0,0,0,0,0),(15,'Noodle Soup','*Gluten Free* One of Thailand’s favorite street food. Rice noodles in a rich clear broth served with bean sprouts, lime, jalapeno, and sweet basil.',1,120,'Lunch Specials',0,0,0,0,0),(16,'California Burger','Burger topped with lettuce, tomato, onion and mayonaise',1,850,'Burgers',0,0,0,0,0),(17,'Flame Thrower Burger','Spicy burger with sauteed onions and jalepenos topped with ghost pepper cheese and sriracha mayo',1,1000,'Burgers',0,0,0,0,0),(18,'Pretzel Bites','Bavarian pretzel bites served with hot queso dip',1,400,'Starters',0,0,0,0,0),(19,'Frickles','Seasoned and deep friend pickle spears servedwith ranch or jalapeno ranch',1,350,'Starters',0,0,0,0,0),(20,'Chicken Club','Crispy or grilled chicken breast topped with honey mustard on a toated bun',1,610,'Sandwiches',0,0,0,0,0),(21,'The Galaxy','Pepperoni, sausage, mushroom, onions and green pepper pizza',1,1500,'Moon Pizzas',0,0,0,0,0),(22,'Midnight Munchies','Garlic butter bites and mozzarella served with pizza sauce for dipping',1,740,'Moon Pizzas',0,0,0,0,0),(23,'Grilled Salmon','6oz Keta salmon filt wild caught from Alaska and served with a dill butter sauce',1,630,'Entrees',0,0,0,0,0),(24,'Redhook Battered Shrimp','Beer battered tail-off shrimp served with cocktail or tartar sauce and lemon wedge',1,580,'',0,0,0,0,0),(25,'Yum Neua','Spicy* Grilled beef, tomatoes, cucumbers, lettuce, onions, and cilantro in spicy lime herb dressing.',1,490,'Salad',0,0,0,0,0),(26,'Fried Ice Cream','Crispy breading on the outside with creamy ice cream inside.',1,450,'',0,0,0,0,0),(27,'Ultimate','CAB® burger, wisconsin aged cheddar, iceberg lettuce, tomato, onion & Red Cow sauce',1,750,'Burgers',0,1,1,0,0),(28,'Barcelona','CAB® burger, manchego, prosciutto, piquillo pepper & smoked aioli',1,750,'Burgers',0,1,1,0,0),(29,'60/40','60% CAB® & 40% ground bacon patty, wisconsin aged cheddar, beer mustard and candied bacon',1,750,'Burgers',0,1,1,0,0),(30,'Blues Burger','CAB® burger, wisconsin blue cheese & apricot-rosemary black pepper jam',1,750,'Burgers',0,1,1,0,0),(31,'Patty Melt','CAB* burger, caramelized onion, sharp cheddar, white american & garlic mayo',1,750,'Burgers',0,1,1,0,0),(32,'Breakfast','CAB® burger, peanut butter, over-easy egg, bacon & wisconsin aged cheddar on sourdough',1,750,'Burgers',0,1,1,0,0),(33,'Cowboy','CAB® burger, wisconsin aged cheddar, root beer pulled pork, onion rings, BBQ sauce',0,750,'Burgers',0,1,1,0,0),(34,'Mushroom-Swiss','CAB® burger, merlot mushrooms, garlic mayo & swiss cheese',0,750,'Burgers',0,1,1,0,0),(35,'Manhattan 2.0','double patty, bacon confit, Gruyere, arugula & dried cherry-red wine chutney, pretzel bun',1,750,'Red Cow Grind',1,1,1,0,0),(36,'Double Barrel Burger','double patty, white american, grilled onion & special sauce',1,750,'Red Cow Grind',1,1,1,0,0),(37,'Quarter Pounder','single patty, yellow american, ketchup, mustard, house pickles',1,750,'Red Cow Grind',1,1,1,0,0),(38,'Tennessee Hot Chicken','southern fried chicken, tennessee hot sauce, blackstrap mayo, house pickles',1,750,'Sandwiches',1,1,1,0,0),(39,'Reuben','kraut, russian aioli, muenster, fresh dill, pumpernickel\nveggie (beets)',1,750,'Sandwiches',0,1,1,0,0),(40,'Salmon','responsibly sourced grilled salmon, lemon-herb mayo, greens, whole wheat bun $14.50',1,750,'Sandwiches',0,1,0,0,0),(41,'Buffalo Cauliflower','gluten-free breading, buffalo sauce, ranch',1,750,'Plant Based',0,0,0,0,0),(42,'So Cal Burger','impossible patty, avocado, american, garlic mayo, lettuce, tomato, onion, whole wheat bun',1,750,'Plant Based',0,0,1,0,0),(43,'Red Cow','organic mixed greens, crispy prosciutto, sunflower, pumpkin, and hemp seeds, shaved parmesan, balsamic vinaigrette',1,600,'Salads',0,1,1,1,0),(44,'Asian','cucumber, carrot, radish, peanuts, root vegetables, citrus-asian vinaigrette',1,550,'Salads',0,0,0,1,0),(45,'Taco','avocado, tinga chicken, queso fresco, tomato, onion, corn salsa, tortilla chips, greens, chipotle-parmesan dressing',1,750,'Salads',0,1,1,0,0),(46,'Beet & Quinoa Salad','roasted red and golden beets, arugula, quinoa, edamame, red peppers, garbanzos, balsamic vinaigrette, chevre',1,650,'Salads',0,1,0,1,0),(47,'Caesar','red & green romaine, garlic croutons, parmesan',1,700,'Salads',0,0,1,0,0),(51,'Chicken Sandwich','Amazing chicken sandwich on ciabatta',2,950,'Sandwiches',1,0,0,1,0),(54,'Standard Burger','The basic burger',1,750,'Burgers',1,1,1,0,0),(55,'Cheeseburger','The basic burger with cheese',1,800,'Burgers',1,1,1,0,0),(56,'French Fries','Delicious side of crispy fries',1,550,'Sides',1,0,0,0,0),(57,'Sweet Potato Fries','Delicious side of crispy sweet potato fries',1,500,'Sides',1,0,0,1,0),(58,'Onion Rings','Delicious side of crispy onion rings',1,520,'Sides',1,0,0,0,0),(59,'Cheese Curds','Delicious side of fresh Wisconsin cheese curds',1,650,'Sides',1,0,1,0,0),(60,'Burger','description',1,NULL,'custom',0,1,1,0,0),(61,'Tripple Dipper','Why choose one when you can choose three? Select three appetizers and enjoy! Served with dipping sauces.',1,NULL,'Appetizers',1,1,1,0,0),(62,'Southwestern Eggrolls','These aren’t your ordinary eggrolls. Crispy flour tortillas, chicken, black beans, corn, jalapeño Jack cheese, red peppers, spinach. Served with avocado-ranch.',1,NULL,'Appetizers',1,0,1,0,0),(63,'Skillet Queso','Your chip’s favorite dip for over 25 years. Original with beef. Served with chips & salsa.',1,NULL,'Appetizers',1,0,1,0,0),(64,'Fried Pickles','Served with house-made ranch.',1,NULL,'Appetizers',1,0,0,0,0),(65,'Queso Burger','This half-pound patty comes smothered in white queso, crunchy tortilla strips & pico.',1,NULL,'Burgers',1,1,1,0,0),(66,'Mushroom Swiss Burger','There’s so mush-room in our hearts for this one. Topped with sauteed onions, mushrooms, Swiss, lettuce, tomato & garlic aioli.',1,NULL,'Burgers',1,1,1,0,0),(67,'Southern Smokehouse Burger','Bacon, cheddar, pickles, Awesome Blossom Petals, lettuce, tomato, garlic aioli. Served with a side of original BBQ sauce.',1,NULL,'Burgers',1,1,1,0,0),(68,'Carnitas Fajitas','Pulled pork carnitas, grilled bell peppers & onions. Topped with a drizzle of mango-habanero sauce and green onions.',1,NULL,'Fajitas',1,1,1,0,0),(69,'Mushroom Jack Chicken Fajitas','Grilled chicken, sauteed mushrooms, crumbled bacon & mixed cheese.',1,NULL,'Fajitas',1,1,1,0,0),(70,'Black Bean & Veggie Fajitas','Black bean patty, roasted asparagus, sauteed mushrooms, corn & black bean salsa, queso fresco, avocado & a drizzle of spicy Santa Fe sauce.',1,NULL,'Fajitas',1,0,1,0,0),(71,'Cajun Chicken Pasta','Grilled chicken, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(72,'Cajun Shrimp Pasta','Shrimp, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(73,'Chipotle Chicken Fresh Mex Bowl','Grilled chicken, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(74,'Chipotle Shrimp Fresh Mex Bowl','Shrimp, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(75,'Tripple Dipper','Why choose one when you can choose three? Select three appetizers and enjoy! Served with dipping sauces.',1,NULL,'Appetizers',1,1,1,0,0),(76,'Southwestern Eggrolls','These aren’t your ordinary eggrolls. Crispy flour tortillas, chicken, black beans, corn, jalapeño Jack cheese, red peppers, spinach. Served with avocado-ranch.',1,NULL,'Appetizers',1,0,1,0,0),(77,'Skillet Queso','Your chip’s favorite dip for over 25 years. Original with beef. Served with chips & salsa.',1,NULL,'Appetizers',1,0,1,0,0),(78,'Fried Pickles','Served with house-made ranch.',1,NULL,'Appetizers',1,0,0,0,0),(79,'Queso Burger','This half-pound patty comes smothered in white queso, crunchy tortilla strips & pico.',1,NULL,'Burgers',1,1,1,0,0),(80,'Mushroom Swiss Burger','There’s so mush-room in our hearts for this one. Topped with sauteed onions, mushrooms, Swiss, lettuce, tomato & garlic aioli.',1,NULL,'Burgers',1,1,1,0,0),(81,'Southern Smokehouse Burger','Bacon, cheddar, pickles, Awesome Blossom Petals, lettuce, tomato, garlic aioli. Served with a side of original BBQ sauce.',1,NULL,'Burgers',1,1,1,0,0),(82,'Carnitas Fajitas','Pulled pork carnitas, grilled bell peppers & onions. Topped with a drizzle of mango-habanero sauce and green onions.',1,NULL,'Fajitas',1,1,1,0,0),(83,'Mushroom Jack Chicken Fajitas','Grilled chicken, sauteed mushrooms, crumbled bacon & mixed cheese.',1,NULL,'Fajitas',1,1,1,0,0),(84,'Black Bean & Veggie Fajitas','Black bean patty, roasted asparagus, sauteed mushrooms, corn & black bean salsa, queso fresco, avocado & a drizzle of spicy Santa Fe sauce.',1,NULL,'Fajitas',1,0,1,0,0),(85,'Cajun Chicken Pasta','Grilled chicken, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(86,'Cajun Shrimp Pasta','Shrimp, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(87,'Chipotle Chicken Fresh Mex Bowl','Grilled chicken, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(88,'Chipotle Shrimp Fresh Mex Bowl','Shrimp, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(89,'Spicy Shrimp Tacos','Three spicy chile-lime shrimp tacos in flour tortillas with pico, avocado, cilantro, coleslaw queso fresco. Served with Mexican rice & black beans.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(90,'Ancho Salmon','Seared chile-rubbed Atlantic salmon, spicy citrus-chile sauce, cilantro, queso fresco. Served with Mexican rice & steamed broccoli.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(91,'Crispy Chicken Crispers','Served with fries, corn on the cob and choice of honey-mustard, BBQ sauce or house-made ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(92,'Crispy Honey-Chipotle Chicken Crispers','Served with fries, corn on the cob and ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(93,'Honey-Chipotle Crispers® & Waffles','Crispers on top of Belgian waffles. Topped with bacon, jalapeños, ancho-chile ranch. Served with fries & honey-chipotle sauce.',1,NULL,'Chicken Crispers',1,1,1,0,0),(94,'Crispy Buffalo Bleu Crispers','Served with fries, corn on the cob and bleu cheese.',1,NULL,'Chicken Crispers',0,1,1,0,0),(95,'Crispy Mango-Habanero Crispers','Served with fries, corn on the cob and ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(96,'Tripple Dipper','Why choose one when you can choose three? Select three appetizers and enjoy! Served with dipping sauces.',1,NULL,'Appetizers',1,1,1,0,0),(97,'Southwestern Eggrolls','These aren’t your ordinary eggrolls. Crispy flour tortillas, chicken, black beans, corn, jalapeño Jack cheese, red peppers, spinach. Served with avocado-ranch.',1,NULL,'Appetizers',1,0,1,0,0),(98,'Skillet Queso','Your chip’s favorite dip for over 25 years. Original with beef. Served with chips & salsa.',1,NULL,'Appetizers',1,0,1,0,0),(99,'Fried Pickles','Served with house-made ranch.',1,NULL,'Appetizers',1,0,0,0,0),(100,'Queso Burger','This half-pound patty comes smothered in white queso, crunchy tortilla strips & pico.',1,NULL,'Burgers',1,1,1,0,0),(101,'Mushroom Swiss Burger','There’s so mush-room in our hearts for this one. Topped with sauteed onions, mushrooms, Swiss, lettuce, tomato & garlic aioli.',1,NULL,'Burgers',1,1,1,0,0),(102,'Southern Smokehouse Burger','Bacon, cheddar, pickles, Awesome Blossom Petals, lettuce, tomato, garlic aioli. Served with a side of original BBQ sauce.',1,NULL,'Burgers',1,1,1,0,0),(103,'Carnitas Fajitas','Pulled pork carnitas, grilled bell peppers & onions. Topped with a drizzle of mango-habanero sauce and green onions.',1,NULL,'Fajitas',1,1,1,0,0),(104,'Mushroom Jack Chicken Fajitas','Grilled chicken, sauteed mushrooms, crumbled bacon & mixed cheese.',1,NULL,'Fajitas',1,1,1,0,0),(105,'Black Bean & Veggie Fajitas','Black bean patty, roasted asparagus, sauteed mushrooms, corn & black bean salsa, queso fresco, avocado & a drizzle of spicy Santa Fe sauce.',1,NULL,'Fajitas',1,0,1,0,0),(106,'Cajun Chicken Pasta','Grilled chicken, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(107,'Cajun Shrimp Pasta','Shrimp, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(108,'Chipotle Chicken Fresh Mex Bowl','Grilled chicken, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(109,'Chipotle Shrimp Fresh Mex Bowl','Shrimp, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(110,'Spicy Shrimp Tacos','Three spicy chile-lime shrimp tacos in flour tortillas with pico, avocado, cilantro, coleslaw queso fresco. Served with Mexican rice & black beans.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(111,'Ancho Salmon','Seared chile-rubbed Atlantic salmon, spicy citrus-chile sauce, cilantro, queso fresco. Served with Mexican rice & steamed broccoli.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(112,'Crispy Chicken Crispers','Served with fries, corn on the cob and choice of honey-mustard, BBQ sauce or house-made ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(113,'Crispy Honey-Chipotle Chicken Crispers','Served with fries, corn on the cob and ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(114,'Honey-Chipotle Crispers® & Waffles','Crispers on top of Belgian waffles. Topped with bacon, jalapeños, ancho-chile ranch. Served with fries & honey-chipotle sauce.',1,NULL,'Chicken Crispers',1,1,1,0,0),(115,'Crispy Buffalo Bleu Crispers','Served with fries, corn on the cob and bleu cheese.',1,NULL,'Chicken Crispers',0,1,1,0,0),(116,'Crispy Mango-Habanero Crispers','Served with fries, corn on the cob and ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(117,'Tripple Dipper','Why choose one when you can choose three? Select three appetizers and enjoy! Served with dipping sauces.',1,NULL,'Appetizers',1,1,1,0,0); +INSERT INTO `MenuItem` VALUES (1,'French Fries','Crispy fries',1,400,'Appetizers',0,0,0,0,0),(2,'Traditional Tots','Classic potato tater tots',1,400,'Appetizers',0,0,0,0,0),(3,'Chicken Strips','Crispy chicken strips',1,800,'Appetizers',0,0,0,0,0),(4,'Cheese Curds','Little fried cheese balls',1,750,'Appetizers',0,0,0,0,0),(5,'Mozzarella Sticks','Good with marinara',1,750,'Appetizers',0,0,0,0,0),(6,'Grilled Cheese','Rosemary Bread with your choice of cheese',1,850,'Paninis',0,0,0,0,0),(7,'Chicken Avocado','Rosemary Bread, Chicken, Gouda, Avocado Mayo, Spinach',1,825,'Paninis',0,0,0,0,0),(8,'Curry Basil Leaved Fried Rice','Spicy*. Zesty red curry paste stir fried with Jasmine rice, egg, basil, onion, and bell peppers.\n',1,272,'Thai Fried Rice',0,0,0,0,0),(9,'Pad Thai','A staple of every Thai restaurant, Pad Thai is a stir fried rice noodle, tangy pad Thai sauce, egg, green onions, and bean sprouts served with crushed peanut and lime on the side.',1,1131,'Noodle Stir Fry',0,0,0,0,0),(10,'Rice Noodle gluten free','Gluten Free* Thai classic street noodle soup, Goid-Tiou. Just like in Thailand, you get your choice of noodle and meat in this delightful and delicious Thai spice soup. All soup is served with bean sprouts, jalapeno, and sweet basil.',1,192,'Noodle Soup',0,0,0,0,0),(11,'Thai Fried Rice','Thai Jasmine rice blended with egg, onions, tomatoes, and scallions.',1,137,'Lunch Specials',0,0,0,0,0),(12,' Red Curry','Gluten Free* *Spicy* Red curry paste, coconut milk, egg plant, bell peppers, bamboo shoots, lime leaves, and basil. Served with rice.',1,441,'Lunch Specials',0,0,0,0,0),(13,'Green Curry','Gluten Free* *Spicy* Green curry paste, coconut milk, egg plant, bell peppers, bamboo shoots, lime leaves, and basil. Served with rice.',1,310,'Lunch Specials',0,0,0,0,0),(14,'Pad Ruom Mid','Stir fried seasonal vegetables in our soy based sauce.\n',1,547,'Lunch Specials',0,0,0,0,0),(15,'Noodle Soup','*Gluten Free* One of Thailand’s favorite street food. Rice noodles in a rich clear broth served with bean sprouts, lime, jalapeno, and sweet basil.',1,120,'Lunch Specials',0,0,0,0,0),(16,'California Burger','Burger topped with lettuce, tomato, onion and mayonaise',1,850,'Burgers',0,0,0,0,0),(17,'Flame Thrower Burger','Spicy burger with sauteed onions and jalepenos topped with ghost pepper cheese and sriracha mayo',1,1000,'Burgers',0,0,0,0,0),(18,'Pretzel Bites','Bavarian pretzel bites served with hot queso dip',1,400,'Starters',0,0,0,0,0),(19,'Frickles','Seasoned and deep friend pickle spears servedwith ranch or jalapeno ranch',1,350,'Starters',0,0,0,0,0),(20,'Chicken Club','Crispy or grilled chicken breast topped with honey mustard on a toated bun',1,610,'Sandwiches',0,0,0,0,0),(21,'The Galaxy','Pepperoni, sausage, mushroom, onions and green pepper pizza',1,1500,'Moon Pizzas',0,0,0,0,0),(22,'Midnight Munchies','Garlic butter bites and mozzarella served with pizza sauce for dipping',1,740,'Moon Pizzas',0,0,0,0,0),(23,'Grilled Salmon','6oz Keta salmon filt wild caught from Alaska and served with a dill butter sauce',1,630,'Entrees',0,0,0,0,0),(24,'Redhook Battered Shrimp','Beer battered tail-off shrimp served with cocktail or tartar sauce and lemon wedge',1,580,'',0,0,0,0,0),(25,'Yum Neua','Spicy* Grilled beef, tomatoes, cucumbers, lettuce, onions, and cilantro in spicy lime herb dressing.',1,490,'Salad',0,0,0,0,0),(26,'Fried Ice Cream','Crispy breading on the outside with creamy ice cream inside.',1,450,'',0,0,0,0,0),(27,'Ultimate','CAB® burger, wisconsin aged cheddar, iceberg lettuce, tomato, onion & Red Cow sauce',1,750,'Burgers',0,1,1,0,0),(28,'Barcelona','CAB® burger, manchego, prosciutto, piquillo pepper & smoked aioli',1,750,'Burgers',0,1,1,0,0),(29,'60/40','60% CAB® & 40% ground bacon patty, wisconsin aged cheddar, beer mustard and candied bacon',1,750,'Burgers',0,1,1,0,0),(30,'Blues Burger','CAB® burger, wisconsin blue cheese & apricot-rosemary black pepper jam',1,750,'Burgers',0,1,1,0,0),(31,'Patty Melt','CAB* burger, caramelized onion, sharp cheddar, white american & garlic mayo',1,750,'Burgers',0,1,1,0,0),(32,'Breakfast','CAB® burger, peanut butter, over-easy egg, bacon & wisconsin aged cheddar on sourdough',1,750,'Burgers',0,1,1,0,0),(33,'Cowboy','CAB® burger, wisconsin aged cheddar, root beer pulled pork, onion rings, BBQ sauce',0,750,'Burgers',0,1,1,0,0),(34,'Mushroom-Swiss','CAB® burger, merlot mushrooms, garlic mayo & swiss cheese',0,750,'Burgers',0,1,1,0,0),(35,'Manhattan 2.0','double patty, bacon confit, Gruyere, arugula & dried cherry-red wine chutney, pretzel bun',1,750,'Red Cow Grind',1,1,1,0,0),(36,'Double Barrel Burger','double patty, white american, grilled onion & special sauce',1,750,'Red Cow Grind',1,1,1,0,0),(37,'Quarter Pounder','single patty, yellow american, ketchup, mustard, house pickles',1,750,'Red Cow Grind',1,1,1,0,0),(38,'Tennessee Hot Chicken','southern fried chicken, tennessee hot sauce, blackstrap mayo, house pickles',1,750,'Sandwiches',1,1,1,0,0),(39,'Reuben','kraut, russian aioli, muenster, fresh dill, pumpernickel\nveggie (beets)',1,750,'Sandwiches',0,1,1,0,0),(40,'Salmon','responsibly sourced grilled salmon, lemon-herb mayo, greens, whole wheat bun $14.50',1,750,'Sandwiches',0,1,0,0,0),(41,'Buffalo Cauliflower','gluten-free breading, buffalo sauce, ranch',1,750,'Plant Based',0,0,0,0,0),(42,'So Cal Burger','impossible patty, avocado, american, garlic mayo, lettuce, tomato, onion, whole wheat bun',1,750,'Plant Based',0,0,1,0,0),(43,'Red Cow','organic mixed greens, crispy prosciutto, sunflower, pumpkin, and hemp seeds, shaved parmesan, balsamic vinaigrette',1,600,'Salads',0,1,1,1,0),(44,'Asian','cucumber, carrot, radish, peanuts, root vegetables, citrus-asian vinaigrette',1,550,'Salads',0,0,0,1,0),(45,'Taco','avocado, tinga chicken, queso fresco, tomato, onion, corn salsa, tortilla chips, greens, chipotle-parmesan dressing',1,750,'Salads',0,1,1,0,0),(46,'Beet & Quinoa Salad','roasted red and golden beets, arugula, quinoa, edamame, red peppers, garbanzos, balsamic vinaigrette, chevre',1,650,'Salads',0,1,0,1,0),(47,'Caesar','red & green romaine, garlic croutons, parmesan',1,700,'Salads',0,0,1,0,0),(51,'Chicken Sandwich','Amazing chicken sandwich on ciabatta',2,950,'Sandwiches',1,0,0,1,0),(54,'Standard Burger','The basic burger',1,750,'Burgers',1,1,1,0,0),(55,'Cheeseburger','The basic burger with cheese',1,800,'Burgers',1,1,1,0,0),(56,'French Fries','Delicious side of crispy fries',1,550,'Sides',1,0,0,0,0),(57,'Sweet Potato Fries','Delicious side of crispy sweet potato fries',1,500,'Sides',1,0,0,1,0),(58,'Onion Rings','Delicious side of crispy onion rings',1,520,'Sides',1,0,0,0,0),(59,'Cheese Curds','Delicious side of fresh Wisconsin cheese curds',1,650,'Sides',1,0,1,0,0),(60,'Burger','description',1,NULL,'custom',0,1,1,0,0),(61,'Tripple Dipper','Why choose one when you can choose three? Select three appetizers and enjoy! Served with dipping sauces.',1,NULL,'Appetizers',1,1,1,0,0),(62,'Southwestern Eggrolls','These aren’t your ordinary eggrolls. Crispy flour tortillas, chicken, black beans, corn, jalapeño Jack cheese, red peppers, spinach. Served with avocado-ranch.',1,NULL,'Appetizers',1,0,1,0,0),(63,'Skillet Queso','Your chip’s favorite dip for over 25 years. Original with beef. Served with chips & salsa.',1,NULL,'Appetizers',1,0,1,0,0),(64,'Fried Pickles','Served with house-made ranch.',1,NULL,'Appetizers',1,0,0,0,0),(65,'Queso Burger','This half-pound patty comes smothered in white queso, crunchy tortilla strips & pico.',1,NULL,'Burgers',1,1,1,0,0),(66,'Mushroom Swiss Burger','There’s so mush-room in our hearts for this one. Topped with sauteed onions, mushrooms, Swiss, lettuce, tomato & garlic aioli.',1,NULL,'Burgers',1,1,1,0,0),(67,'Southern Smokehouse Burger','Bacon, cheddar, pickles, Awesome Blossom Petals, lettuce, tomato, garlic aioli. Served with a side of original BBQ sauce.',1,NULL,'Burgers',1,1,1,0,0),(68,'Carnitas Fajitas','Pulled pork carnitas, grilled bell peppers & onions. Topped with a drizzle of mango-habanero sauce and green onions.',1,NULL,'Fajitas',1,1,1,0,0),(69,'Mushroom Jack Chicken Fajitas','Grilled chicken, sauteed mushrooms, crumbled bacon & mixed cheese.',1,NULL,'Fajitas',1,1,1,0,0),(70,'Black Bean & Veggie Fajitas','Black bean patty, roasted asparagus, sauteed mushrooms, corn & black bean salsa, queso fresco, avocado & a drizzle of spicy Santa Fe sauce.',1,NULL,'Fajitas',1,0,1,0,0),(71,'Cajun Chicken Pasta','Grilled chicken, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(72,'Cajun Shrimp Pasta','Shrimp, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(73,'Chipotle Chicken Fresh Mex Bowl','Grilled chicken, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(74,'Chipotle Shrimp Fresh Mex Bowl','Shrimp, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(75,'Tripple Dipper','Why choose one when you can choose three? Select three appetizers and enjoy! Served with dipping sauces.',1,NULL,'Appetizers',1,1,1,0,0),(76,'Southwestern Eggrolls','These aren’t your ordinary eggrolls. Crispy flour tortillas, chicken, black beans, corn, jalapeño Jack cheese, red peppers, spinach. Served with avocado-ranch.',1,NULL,'Appetizers',1,0,1,0,0),(77,'Skillet Queso','Your chip’s favorite dip for over 25 years. Original with beef. Served with chips & salsa.',1,NULL,'Appetizers',1,0,1,0,0),(78,'Fried Pickles','Served with house-made ranch.',1,NULL,'Appetizers',1,0,0,0,0),(79,'Queso Burger','This half-pound patty comes smothered in white queso, crunchy tortilla strips & pico.',1,NULL,'Burgers',1,1,1,0,0),(80,'Mushroom Swiss Burger','There’s so mush-room in our hearts for this one. Topped with sauteed onions, mushrooms, Swiss, lettuce, tomato & garlic aioli.',1,NULL,'Burgers',1,1,1,0,0),(81,'Southern Smokehouse Burger','Bacon, cheddar, pickles, Awesome Blossom Petals, lettuce, tomato, garlic aioli. Served with a side of original BBQ sauce.',1,NULL,'Burgers',1,1,1,0,0),(82,'Carnitas Fajitas','Pulled pork carnitas, grilled bell peppers & onions. Topped with a drizzle of mango-habanero sauce and green onions.',1,NULL,'Fajitas',1,1,1,0,0),(83,'Mushroom Jack Chicken Fajitas','Grilled chicken, sauteed mushrooms, crumbled bacon & mixed cheese.',1,NULL,'Fajitas',1,1,1,0,0),(84,'Black Bean & Veggie Fajitas','Black bean patty, roasted asparagus, sauteed mushrooms, corn & black bean salsa, queso fresco, avocado & a drizzle of spicy Santa Fe sauce.',1,NULL,'Fajitas',1,0,1,0,0),(85,'Cajun Chicken Pasta','Grilled chicken, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(86,'Cajun Shrimp Pasta','Shrimp, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(87,'Chipotle Chicken Fresh Mex Bowl','Grilled chicken, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(88,'Chipotle Shrimp Fresh Mex Bowl','Shrimp, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(89,'Spicy Shrimp Tacos','Three spicy chile-lime shrimp tacos in flour tortillas with pico, avocado, cilantro, coleslaw queso fresco. Served with Mexican rice & black beans.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(90,'Ancho Salmon','Seared chile-rubbed Atlantic salmon, spicy citrus-chile sauce, cilantro, queso fresco. Served with Mexican rice & steamed broccoli.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(91,'Crispy Chicken Crispers','Served with fries, corn on the cob and choice of honey-mustard, BBQ sauce or house-made ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(92,'Crispy Honey-Chipotle Chicken Crispers','Served with fries, corn on the cob and ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(93,'Honey-Chipotle Crispers® & Waffles','Crispers on top of Belgian waffles. Topped with bacon, jalapeños, ancho-chile ranch. Served with fries & honey-chipotle sauce.',1,NULL,'Chicken Crispers',1,1,1,0,0),(94,'Crispy Buffalo Bleu Crispers','Served with fries, corn on the cob and bleu cheese.',1,NULL,'Chicken Crispers',0,1,1,0,0),(95,'Crispy Mango-Habanero Crispers','Served with fries, corn on the cob and ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(96,'Tripple Dipper','Why choose one when you can choose three? Select three appetizers and enjoy! Served with dipping sauces.',1,NULL,'Appetizers',1,1,1,0,0),(97,'Southwestern Eggrolls','These aren’t your ordinary eggrolls. Crispy flour tortillas, chicken, black beans, corn, jalapeño Jack cheese, red peppers, spinach. Served with avocado-ranch.',1,NULL,'Appetizers',1,0,1,0,0),(98,'Skillet Queso','Your chip’s favorite dip for over 25 years. Original with beef. Served with chips & salsa.',1,NULL,'Appetizers',1,0,1,0,0),(99,'Fried Pickles','Served with house-made ranch.',1,NULL,'Appetizers',1,0,0,0,0),(100,'Queso Burger','This half-pound patty comes smothered in white queso, crunchy tortilla strips & pico.',1,NULL,'Burgers',1,1,1,0,0),(101,'Mushroom Swiss Burger','There’s so mush-room in our hearts for this one. Topped with sauteed onions, mushrooms, Swiss, lettuce, tomato & garlic aioli.',1,NULL,'Burgers',1,1,1,0,0),(102,'Southern Smokehouse Burger','Bacon, cheddar, pickles, Awesome Blossom Petals, lettuce, tomato, garlic aioli. Served with a side of original BBQ sauce.',1,NULL,'Burgers',1,1,1,0,0),(103,'Carnitas Fajitas','Pulled pork carnitas, grilled bell peppers & onions. Topped with a drizzle of mango-habanero sauce and green onions.',1,NULL,'Fajitas',1,1,1,0,0),(104,'Mushroom Jack Chicken Fajitas','Grilled chicken, sauteed mushrooms, crumbled bacon & mixed cheese.',1,NULL,'Fajitas',1,1,1,0,0),(105,'Black Bean & Veggie Fajitas','Black bean patty, roasted asparagus, sauteed mushrooms, corn & black bean salsa, queso fresco, avocado & a drizzle of spicy Santa Fe sauce.',1,NULL,'Fajitas',1,0,1,0,0),(106,'Cajun Chicken Pasta','Grilled chicken, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(107,'Cajun Shrimp Pasta','Shrimp, penne in Alfredo sauce, topped with chile spices, Parmesan, tomatoes, green onions. Served with garlic toast.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(108,'Chipotle Chicken Fresh Mex Bowl','Grilled chicken, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(109,'Chipotle Shrimp Fresh Mex Bowl','Shrimp, pico, field greens, Mexican rice, corn & black bean salsa, avocado, shredded cheese, tortilla strips, cilantro, chipotle pesto, house-made ranch.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(110,'Spicy Shrimp Tacos','Three spicy chile-lime shrimp tacos in flour tortillas with pico, avocado, cilantro, coleslaw queso fresco. Served with Mexican rice & black beans.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(111,'Ancho Salmon','Seared chile-rubbed Atlantic salmon, spicy citrus-chile sauce, cilantro, queso fresco. Served with Mexican rice & steamed broccoli.',1,NULL,'Chicken & Seafood',1,1,0,0,0),(112,'Crispy Chicken Crispers','Served with fries, corn on the cob and choice of honey-mustard, BBQ sauce or house-made ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(113,'Crispy Honey-Chipotle Chicken Crispers','Served with fries, corn on the cob and ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(114,'Honey-Chipotle Crispers® & Waffles','Crispers on top of Belgian waffles. Topped with bacon, jalapeños, ancho-chile ranch. Served with fries & honey-chipotle sauce.',1,NULL,'Chicken Crispers',1,1,1,0,0),(115,'Crispy Buffalo Bleu Crispers','Served with fries, corn on the cob and bleu cheese.',1,NULL,'Chicken Crispers',0,1,1,0,0),(116,'Crispy Mango-Habanero Crispers','Served with fries, corn on the cob and ranch.',1,NULL,'Chicken Crispers',0,1,0,0,0),(117,'Tripple Dipper','Why choose one when you can choose three? Select three appetizers and enjoy! Served with dipping sauces.',1,NULL,'Appetizers',1,1,1,0,0),(118,'Cheese Pizza','The cheesiest',1,750,'Pizzas',1,0,1,0,0),(119,'Pepperoni Pizza','The classic',1,850,'Pizzas',1,0,1,0,0),(120,'Cheese Pizza','The cheesiest',1,750,'Pizzas',1,0,1,0,0),(121,'Pepperoni Pizza','The classic',1,850,'Pizzas',1,0,1,0,0); /*!40000 ALTER TABLE `MenuItem` ENABLE KEYS */; UNLOCK TABLES; @@ -191,7 +161,7 @@ CREATE TABLE `MenuTimes` ( PRIMARY KEY (`timeID`), KEY `MenuTimes_ibfk_1` (`menuID`), CONSTRAINT `MenuTimes_ibfk_1` FOREIGN KEY (`menuID`) REFERENCES `Menu` (`menuID`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -200,7 +170,7 @@ CREATE TABLE `MenuTimes` ( LOCK TABLES `MenuTimes` WRITE; /*!40000 ALTER TABLE `MenuTimes` DISABLE KEYS */; -INSERT INTO `MenuTimes` VALUES (2,8,1500,1800),(3,8,2200,2300),(4,7,1030,1500),(6,7,0,2400),(7,9,1100,2100),(8,10,1100,2100),(9,11,1100,1500),(10,12,1630,2200),(11,13,1100,1430),(12,14,1700,2100),(13,15,1400,1700),(14,15,2200,2359),(25,32,0,2400),(38,48,0,0),(39,49,0,0); +INSERT INTO `MenuTimes` VALUES (3,8,2200,2300),(4,7,1030,1500),(6,7,0,2400),(7,9,1100,2100),(8,10,1100,2100),(9,11,1100,1500),(10,12,1630,2200),(11,13,1100,1430),(12,14,1700,2100),(13,15,1400,1700),(14,15,2200,2359),(25,32,0,2400),(38,48,0,0),(39,49,0,0),(40,51,1100,1200),(41,52,1000,1500),(42,53,1000,1500); /*!40000 ALTER TABLE `MenuTimes` ENABLE KEYS */; UNLOCK TABLES; @@ -215,8 +185,9 @@ CREATE TABLE `Options` ( `optionID` int(11) NOT NULL AUTO_INCREMENT, `optionName` varchar(100) DEFAULT NULL, `price` decimal(10,2) DEFAULT NULL, + `optionStatus` tinyint(1) DEFAULT '1', PRIMARY KEY (`optionID`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -225,7 +196,7 @@ CREATE TABLE `Options` ( LOCK TABLES `Options` WRITE; /*!40000 ALTER TABLE `Options` DISABLE KEYS */; -INSERT INTO `Options` VALUES (1,'Add Bacon',1.50),(2,'Extra Pickles',0.00),(3,'Add Fried Onions',0.00),(4,'Add Cheese',0.50); +INSERT INTO `Options` VALUES (1,'Add Bacon',1.50,1),(2,'Extra Pickles',0.00,1),(3,'Add Fried Onions',0.00,1),(4,'Add Cheese',0.50,1),(5,'Extra Cheese',1.50,1); /*!40000 ALTER TABLE `Options` ENABLE KEYS */; UNLOCK TABLES; @@ -242,12 +213,13 @@ CREATE TABLE `OrderItem` ( `quantity` int(11) NOT NULL, `comments` text, `orderID` int(11) DEFAULT NULL, + `price` decimal(10,2) NOT NULL, PRIMARY KEY (`orderItemID`), KEY `menuItemID` (`menuItemID`), KEY `OrderItem_ibfk_2` (`orderID`), CONSTRAINT `OrderItem_ibfk_1` FOREIGN KEY (`menuItemID`) REFERENCES `MenuItem` (`itemID`), CONSTRAINT `OrderItem_ibfk_2` FOREIGN KEY (`orderID`) REFERENCES `Orders` (`orderID`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -256,7 +228,7 @@ CREATE TABLE `OrderItem` ( LOCK TABLES `OrderItem` WRITE; /*!40000 ALTER TABLE `OrderItem` DISABLE KEYS */; -INSERT INTO `OrderItem` VALUES (1,35,1,'Cooked medium-rare',1),(2,38,2,'Extra spicy',1),(3,39,2,NULL,2),(4,43,1,NULL,2),(5,41,1,'Please put the sauce on the side',2),(6,42,1,'Extra Pickles',1),(7,8,2,NULL,3),(8,10,1,'extra spicy',3),(9,11,1,NULL,3),(10,14,1,'no mushrooms please',3),(11,8,2,NULL,8),(12,10,3,NULL,8),(13,14,1,'extra rice',8); +INSERT INTO `OrderItem` VALUES (1,35,1,'Cooked medium-rare',1,0.00),(2,38,2,'Extra spicy',1,0.00),(3,39,2,NULL,2,0.00),(4,43,1,NULL,2,0.00),(5,41,1,'Please put the sauce on the side',2,0.00),(6,42,1,'Extra Pickles',1,0.00),(7,8,2,NULL,3,7.99),(8,10,1,'extra spicy',3,10.99),(9,11,1,NULL,3,7.99),(10,14,1,'no mushrooms please',3,10.99),(11,8,2,NULL,8,0.00),(12,10,3,NULL,8,0.00),(13,14,1,'extra rice',8,0.00),(14,56,1,NULL,1,0.00),(15,56,1,NULL,1,0.00),(16,118,2,'N/A',10,0.00),(17,118,2,'Extra napkins please',11,0.00),(18,118,1,'N/A',11,0.00),(19,120,2,'Extra napkins please',11,8.99),(20,120,1,'N/A',11,8.99),(21,120,2,'Extra napkins please',14,8.99),(22,120,1,'N/A',14,8.99),(23,121,2,'Extra napkins please',14,21.98); /*!40000 ALTER TABLE `OrderItem` ENABLE KEYS */; UNLOCK TABLES; @@ -276,7 +248,7 @@ CREATE TABLE `OrderItemHasOptions` ( KEY `OrderItemHasOptions_ibfk_2_idx` (`optionID`), CONSTRAINT `OrderItemHasOptions_ibfk_1` FOREIGN KEY (`orderItemID`) REFERENCES `OrderItem` (`orderItemID`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `OrderItemHasOptions_ibfk_2` FOREIGN KEY (`optionID`) REFERENCES `Options` (`optionID`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -285,6 +257,7 @@ CREATE TABLE `OrderItemHasOptions` ( LOCK TABLES `OrderItemHasOptions` WRITE; /*!40000 ALTER TABLE `OrderItemHasOptions` DISABLE KEYS */; +INSERT INTO `OrderItemHasOptions` VALUES (1,16,5),(2,18,5),(3,20,5),(4,22,5); /*!40000 ALTER TABLE `OrderItemHasOptions` ENABLE KEYS */; UNLOCK TABLES; @@ -298,16 +271,16 @@ DROP TABLE IF EXISTS `Orders`; CREATE TABLE `Orders` ( `orderID` int(11) NOT NULL AUTO_INCREMENT, `tableID` int(11) DEFAULT NULL, - `orderTime` int(11) DEFAULT NULL, + `orderTime` datetime DEFAULT NULL, `chargeAmount` decimal(10,2) DEFAULT NULL, `userID` int(11) DEFAULT NULL, `orderStatus` tinyint(1) DEFAULT NULL, PRIMARY KEY (`orderID`), - KEY `Orders_ibfk_2_idx` (`tableID`), KEY `Orders_ibfk_11_idx` (`userID`), - CONSTRAINT `Orders_ibfk_10` FOREIGN KEY (`tableID`) REFERENCES `RestaurantTables` (`tableID`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `Orders_ibfk_11` FOREIGN KEY (`userID`) REFERENCES `Users` (`userID`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + KEY `Orders_ibfk_12_idx` (`tableID`), + CONSTRAINT `Orders_ibfk_11` FOREIGN KEY (`userID`) REFERENCES `Users` (`userID`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `Orders_ibfk_12` FOREIGN KEY (`tableID`) REFERENCES `RestaurantTables` (`tableID`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -316,7 +289,7 @@ CREATE TABLE `Orders` ( LOCK TABLES `Orders` WRITE; /*!40000 ALTER TABLE `Orders` DISABLE KEYS */; -INSERT INTO `Orders` VALUES (1,1,1230,0.00,2,0),(2,1,1300,0.00,2,0),(3,1,1415,0.00,2,0),(4,1,1905,0.00,2,0),(5,1,2150,0.00,2,0),(6,1,2030,0.00,2,0),(7,1,2035,0.00,2,0),(8,1,2015,0.00,2,0),(9,1,2015,0.00,2,0); +INSERT INTO `Orders` VALUES (1,1,'2020-04-14 14:15:00',0.00,2,0),(2,1,'2020-04-15 12:30:00',0.00,2,0),(3,1,'2020-04-13 18:45:00',0.00,2,0),(4,1,'2020-04-15 12:30:00',0.00,2,0),(5,1,'2020-04-14 14:15:00',0.00,2,0),(6,1,'2020-04-13 18:45:00',0.00,2,0),(7,1,'2020-04-15 12:30:00',0.00,2,0),(8,1,'2020-04-15 12:30:00',0.00,2,0),(9,1,'2020-04-13 18:45:00',0.00,2,0),(10,2,'2020-04-16 11:45:00',21.61,10,1),(11,2,'0000-00-00 00:00:00',NULL,10,1),(13,1,'2020-04-16 20:38:43',NULL,3,0),(14,4,'2020-04-16 21:04:01',74.60,11,1); /*!40000 ALTER TABLE `Orders` ENABLE KEYS */; UNLOCK TABLES; @@ -339,7 +312,7 @@ CREATE TABLE `Restaurant` ( `country` varchar(45) DEFAULT NULL, PRIMARY KEY (`restaurantId`), UNIQUE KEY `restaurantId_UNIQUE` (`restaurantId`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci CHECKSUM=1; +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci CHECKSUM=1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -348,7 +321,7 @@ CREATE TABLE `Restaurant` ( LOCK TABLES `Restaurant` WRITE; /*!40000 ALTER TABLE `Restaurant` DISABLE KEYS */; -INSERT INTO `Restaurant` VALUES (1,'Scooters','University of St. Thomas fast dining','2115 Summit Ave',7.70,'St. Paul','MN',55105,'United States'),(2,'Khao Hom','Thai Restaurant','2411 Central Ave NE',7.00,'Minneapolis','MN',55418,'United States'),(3,'Chipotle Mexican Restaurant','Fast-food Mexican Restaurant','2600 Hennepin Ave',7.00,'Minneapolis','MN',55408,'United States'),(4,'Roti Modern Mediterranean','Mediterranean','614 Washington Ave SE',0.00,'Minneapolis','MN',55414,'United States'),(5,'Red Cow Restaurant','Hamburger','393 Selby Avenue',7.70,'St. Paul','MN',55105,'United States'); +INSERT INTO `Restaurant` VALUES (1,'Scooters','University of St. Thomas fast dining','2115 Summit Ave',7.70,'St. Paul','MN',55105,'United States'),(2,'Khao Hom','Thai Restaurant','2411 Central Ave NE',7.00,'Minneapolis','MN',55418,'United States'),(3,'Chipotle Mexican Restaurant','Fast-food Mexican Restaurant','2600 Hennepin Ave',7.00,'Minneapolis','MN',55408,'United States'),(4,'Roti Modern Mediterranean','Mediterranean','614 Washington Ave SE',0.00,'Minneapolis','MN',55414,'United States'),(5,'Red Cow Restaurant','Hamburger','393 Selby Avenue',7.70,'St. Paul','MN',55105,'United States'),(11,'test','test restaurant','address',2.30,'chaska','mn',55318,'USA'),(12,'Davannis','Go-To Spot for pizza and sandwiches','1234 Addr St.',0.03,'St. Paul','MN',55105,'USA'),(13,'Davannis','Go-To Spot for pizza and sandwiches','1234 Addr St.',0.03,'St. Paul','MN',55105,'USA'); /*!40000 ALTER TABLE `Restaurant` ENABLE KEYS */; UNLOCK TABLES; @@ -388,14 +361,16 @@ DROP TABLE IF EXISTS `RestaurantTables`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `RestaurantTables` ( - `tableID` int(11) NOT NULL, + `tableID` int(11) NOT NULL AUTO_INCREMENT, `alexaID` varchar(100) DEFAULT NULL, `qrCode` varchar(100) DEFAULT NULL, `restaurantID` int(11) DEFAULT NULL, PRIMARY KEY (`tableID`), + UNIQUE KEY `alexaID_UNIQUE` (`alexaID`), + UNIQUE KEY `qrCode_UNIQUE` (`qrCode`), KEY `RestaurantTables_ibfk_1_idx` (`restaurantID`), CONSTRAINT `RestaurantTables_ibfk_1` FOREIGN KEY (`restaurantID`) REFERENCES `Restaurant` (`restaurantId`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -404,7 +379,7 @@ CREATE TABLE `RestaurantTables` ( LOCK TABLES `RestaurantTables` WRITE; /*!40000 ALTER TABLE `RestaurantTables` DISABLE KEYS */; -INSERT INTO `RestaurantTables` VALUES (1,'1','abc',5); +INSERT INTO `RestaurantTables` VALUES (1,'1','abc',5),(2,'alexaID1234','mockQRCode1234',12),(4,'alexaID12345','mockQRCode12345',13); /*!40000 ALTER TABLE `RestaurantTables` ENABLE KEYS */; UNLOCK TABLES; @@ -419,10 +394,12 @@ CREATE TABLE `Users` ( `userID` int(11) NOT NULL AUTO_INCREMENT, `firstName` varchar(45) DEFAULT NULL, `lastName` varchar(45) DEFAULT NULL, - `email` varchar(45) DEFAULT NULL, - `token` text, - PRIMARY KEY (`userID`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + `email` varchar(100) DEFAULT NULL, + `token` varchar(300) DEFAULT NULL, + PRIMARY KEY (`userID`), + UNIQUE KEY `token_UNIQUE` (`token`), + UNIQUE KEY `email_UNIQUE` (`email`) +) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -431,7 +408,7 @@ CREATE TABLE `Users` ( LOCK TABLES `Users` WRITE; /*!40000 ALTER TABLE `Users` DISABLE KEYS */; -INSERT INTO `Users` VALUES (2,'Bob','Jones','bob@jones.com','test123'); +INSERT INTO `Users` VALUES (2,'Bob','Jones','bob@jones.com','test123'),(3,'\"sosa\"','\"edison\"','\"sosaedison69@gmail.com\"','\"ya29.a0Ae4lvC2NN3o3oJpRm5uJaR8PO95HUYu1ND4MZCBJgJh9N8oMYv4HScjkOpE06su194pQ5Uuo7Hc5S4LAxt0Qmae-n78p5-C5QSlZYxh5q1yQcndoUXJpjxlZ8jZ99LVbovc1Z1hogOQO9yMV7JYi6Y3rGqbOC4yQkGkx\"'),(10,'Bob','Smith','bob@smith.com','test1234'),(11,'Bob','Smith','bob2@smith.com','test12345'),(12,'Default User','','',''),(21,'tyler','beverley','tylerbeverley@test1.gmail.com','1'); /*!40000 ALTER TABLE `Users` ENABLE KEYS */; UNLOCK TABLES; @@ -448,12 +425,18 @@ UNLOCK TABLES; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `AddItemToOrder`(IN orderIDToAddTo INT, IN menuItemIDToAdd INT, IN quantityToAdd INT, IN commentsToAdd TEXT) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `AddItemToOrder`(IN orderIDToAddTo INT, IN menuItemIDToAdd INT, IN menuID INT, IN quantityToAdd INT, IN commentsToAdd TEXT) BEGIN - INSERT INTO OrderItem (menuItemID, quantity, comments, orderID) - VALUES (menuItemIDToAdd, quantityToAdd, commentsToAdd, orderIDToAddTo); + DECLARE inputPrice DECIMAL(10,2); + SELECT price + FROM MenuContains + WHERE MenuContains.menuId = menuID AND MenuContains.menuItemID = menuItemIDToAdd INTO inputPrice; - SELECT LAST_INSERT_ID(); + + INSERT INTO OrderItem (menuItemID, quantity, comments, orderID, price) + VALUES (menuItemIDToAdd, quantityToAdd, commentsToAdd, orderIDToAddTo, inputPrice * quantityToAdd); + + SELECT LAST_INSERT_ID() AS newOrderItemID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -475,7 +458,7 @@ BEGIN INSERT INTO RestaurantManagers(userID, restaurantID) VALUES (userID, restaurantID); - SELECT LAST_INSERT_ID(); + SELECT LAST_INSERT_ID() AS newManagerID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -497,7 +480,7 @@ BEGIN INSERT INTO OrderItemHasOptions(orderItemID, optionID) VALUES (orderItemID, optionID); - SELECT LAST_INSERT_ID(); + SELECT LAST_INSERT_ID() AS newOrderItemOptionID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -516,10 +499,19 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`masterUser`@`%` PROCEDURE `CompleteOrder`(IN oID INT) BEGIN - -- Mark the order inactive (it is now essentially a "reciept") - UPDATE Orders - SET orderStatus = 1 + -- store price of order in temp table + CALL GetTotalPriceOfOrder(oID); + + -- update the order's charge amount to match the total price + UPDATE Orders + SET chargeAmount = (SELECT c1 FROM tmp LIMIT 1) + WHERE orderID = oID; + + -- Return the new charge amount + SELECT chargeAmount + FROM Orders WHERE orderID = oID; + END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -536,14 +528,48 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`TBevs`@`%` PROCEDURE `CreateNewMenu`(IN startTime INT, IN endTime INT, IN mStatus INT, IN menuName varchar(255), IN restaurantID INT, INOUT menuID INT) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateNewMenu`(IN startTime INT, IN endTime INT, IN mStatus INT, IN menuName varchar(255), IN restaurantID INT) BEGIN + DECLARE menuID INT; INSERT INTO Menu(menuStatus, menuName, restaurantID) - VALUES(mStatus, menuName, restaurantID); - SELECT LAST_INSERT_ID() INTO menuID; + VALUES(mStatus, menuName, restaurantID); + + SELECT LAST_INSERT_ID() INTO menuID; + INSERT INTO MenuTimes( menuID, startTime, endTime) - VALUES( (SELECT LAST_INSERT_ID() ), startTime, endTime); - END ;; + VALUES( (SELECT LAST_INSERT_ID() ), startTime, endTime); + + SELECT menuID; + +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP PROCEDURE IF EXISTS `CreateNewMenuItem` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateNewMenuItem`(IN mID INT, IN iName VARCHAR(100), IN idesc TEXT, IN iCategory VARCHAR(100), IN iPrice Decimal(10,2), IN iGluten TINYINT, IN iMeat TINYINT, IN iDairy TINYINT, IN iNuts TINYINT, IN iSoy TINYINT, IN calories INT) +BEGIN + DECLARE createdMenuItemID INT; + + INSERT INTO MenuItem(itemName, description, category, gluten, meat, dairy, nuts, soy, calories, itemStatus) + VALUES(iName, idesc, iCategory, iGluten, iMeat, iDairy, iNuts, iSoy, calories, 1); + + SELECT LAST_INSERT_ID() INTO createdMenuItemID; + + CALL updateMenuContains(mID, LAST_INSERT_ID(), iPrice); + + SELECT createdMenuItemID; +END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; @@ -559,12 +585,12 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateNewOrder`(IN tableID INT, IN orderTime INT, IN chargeAmount DECIMAL(10,2), IN customerID INT ) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateNewOrder`(IN tableID INT, IN customerID INT ) BEGIN - INSERT INTO Orders(tableID, orderTime, chargeAmount, userID, orderStatus) - VALUES (tableID, orderTime, chargeAmount, customerID, 0); + INSERT INTO Orders(tableID, orderTime, userID, orderStatus) + VALUES (tableID, NOW(), customerID, 0); - SELECT LAST_INSERT_ID(); + SELECT LAST_INSERT_ID() AS newOrderID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -581,12 +607,12 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateNewRestaurant`(IN r_name varchar(100), IN r_descr varchar(100), IN r_address varchar(100), IN r_sales_tax DECIMAL(10,2), IN r_city varchar(100), IN r_state varchar(100), IN r_zip INT, IN r_country varchar(100)) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateNewRestaurant`(IN rName varchar(100), IN rDescr varchar(100), IN rAddress varchar(100), IN rSalesTax DECIMAL(10,2), IN rCity varchar(100), IN rState varchar(100), IN rZip INT, IN rCountry varchar(100)) BEGIN INSERT into Restaurant(restaurantName, description, address, salesTax, city, state, zipCode, country) - VALUES(r_name, r_descr, r_address, r_sales_tax, r_city, r_state, r_zip, r_country); + VALUES(rName, rDescr, rAddress, rSalesTax, rCity, rState, rZip, rCountry); - SELECT LAST_INSERT_ID(); + SELECT LAST_INSERT_ID() AS newRestaurantID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -603,22 +629,44 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateOptionForMenuItem`(IN optionName VARCHAR(100), IN price DECIMAL(10,2), IN itemID INT ) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateOptionForMenuItem`(IN oName VARCHAR(100), IN oPrice DECIMAL(10,2), IN itemID INT ) BEGIN DECLARE oID INT; -- INSERT IF DOESN'T EXIST -- - IF (SELECT EXISTS(SELECT * FROM Options WHERE optionName = optionName AND price = price) = 0) THEN - INSERT INTO Options(optionName, price) - VALUES (optionName, price); + IF (SELECT EXISTS(SELECT * FROM Options WHERE optionName = oName AND price = oPrice AND optionStatus = 1) = 0) THEN + INSERT INTO Options(optionName, price, optionStatus) + VALUES (oName, oPrice, 1); END IF; - SELECT optionID INTO oID FROM Options WHERE optionName = optionName AND price = price; + SELECT optionID INTO oID FROM Options WHERE optionName = oName AND price = oPrice; -- Update contains table -- INSERT INTO ItemHasOptions(itemID, optionID) - VALUES(itemID, optionID); + VALUES(itemID, oID); - SELECT LAST_INSERT_ID(); + SELECT LAST_INSERT_ID() AS newMenuItemOptionID; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP PROCEDURE IF EXISTS `CreateRestaurantTable` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateRestaurantTable`(IN alexaID VARCHAR(100), IN qrCode VARCHAR(100), IN restaurantID INT) +BEGIN + INSERT INTO RestaurantTables(alexaID, qrCode, restaurantID) + VALUES (alexaID, qrCode, restaurantID); + + SELECT LAST_INSERT_ID() AS newTableID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -635,12 +683,41 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateUser`(IN firstName VARCHAR(45), IN lastName VARCHAR(45), IN email VARCHAR(45), IN token TEXT ) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `CreateUser`(IN firstName VARCHAR(45), IN lastName VARCHAR(45), IN email VARCHAR(100), IN token VARCHAR(300) ) BEGIN INSERT INTO Users(firstName, lastName, email, token) VALUES (firstName, lastName, email, token); - SELECT LAST_INSERT_ID(); + SELECT LAST_INSERT_ID() AS newUserID; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP PROCEDURE IF EXISTS `GetAccessibleMenus` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetAccessibleMenus`(IN rID int, IN currentTime INT) +BEGIN + -- Return all menus of valid time, matching restaurant id, and active status + SELECT * + FROM Menu + WHERE menuID IN ( + SELECT menuID + FROM MenuTimes + WHERE currentTime BETWEEN startTime AND endTime) + AND restaurantID = rID + AND menuStatus = 1; + + -- SELECT * FROM AutoGarcon.Menu WHERE restaurantID = rID AND menuStatus = 1; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -668,7 +745,7 @@ DELIMITER ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; -/*!50003 DROP PROCEDURE IF EXISTS `GetAllOrderItemsAndQuantity` */; +/*!50003 DROP PROCEDURE IF EXISTS `GetAllOrderItemsFromOrder` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; @@ -678,9 +755,9 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetAllOrderItemsAndQuantity`(IN myOrderID INT) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetAllOrderItemsFromOrder`(IN myOrderID INT) BEGIN - SELECT MenuItem.itemName, OrderItem.quantity + SELECT OrderItem.orderItemID, MenuItem.*, OrderItem.quantity, OrderItem.price, OrderItem.comments FROM MenuItem JOIN OrderItem ON MenuItem.itemID = OrderItem.menuItemID WHERE orderID = myOrderID; END ;; @@ -722,7 +799,11 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetMenuItembyMenuId`(IN id INT) BEGIN - SELECT * FROM AutoGarcon.MenuItem WHERE itemID IN (SELECT menuItemID FROM AutoGarcon.MenuContains WHERE menuID=id); + SELECT items.*, MenuContains.price, MenuContains.containsID + FROM MenuContains JOIN (SELECT * FROM AutoGarcon.MenuItem + WHERE itemID IN (SELECT menuItemID FROM AutoGarcon.MenuContains WHERE menuID=id) + AND itemStatus = 1) AS items + ON MenuContains.menuItemID = items.itemID AND MenuContains.menuID = id; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -742,14 +823,14 @@ DELIMITER ;; CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetMenuItemByName`(IN iName VARCHAR(255)) BEGIN SELECT * - FROM AutoGarcon.MenuItem WHERE itemName = iName; + FROM AutoGarcon.MenuItem WHERE itemName = iName AND itemStatus = 1; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; -/*!50003 DROP PROCEDURE IF EXISTS `GetMenuItemSides` */; +/*!50003 DROP PROCEDURE IF EXISTS `GetMenusByRestaurantId` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; @@ -759,21 +840,16 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetMenuItemSides`(IN menuItem INT) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetMenusByRestaurantId`(IN id int) BEGIN - SELECT MenuItem.itemName - FROM MenuItem - WHERE MenuItem.itemID IN - (SELECT ItemHasSides.sideItemID - FROM ItemHasSides - WHERE menuItemID = menuItem); + SELECT * FROM AutoGarcon.Menu WHERE restaurantID = id; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; -/*!50003 DROP PROCEDURE IF EXISTS `GetMenusByRestaurantId` */; +/*!50003 DROP PROCEDURE IF EXISTS `GetMenuTimes` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; @@ -783,16 +859,18 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetMenusByRestaurantId`(IN id int) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetMenuTimes`(IN mID INT) BEGIN - SELECT * FROM AutoGarcon.Menu WHERE restaurantID = id; + SELECT * + FROM MenuTimes + WHERE menuID = mID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; -/*!50003 DROP PROCEDURE IF EXISTS `GetMenuTimes` */; +/*!50003 DROP PROCEDURE IF EXISTS `GetOptionsForMenuItem` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; @@ -802,18 +880,18 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetMenuTimes`(IN mID INT) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetOptionsForMenuItem`(IN iID INT) BEGIN SELECT * - FROM MenuTimes - WHERE menuID = mID; + FROM Options + WHERE optionStatus = 1 AND optionID IN (SELECT ItemHasOptions.optionID FROM ItemHasOptions WHERE ItemHasOptions.itemID = iID); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; -/*!50003 DROP PROCEDURE IF EXISTS `GetOptionsForMenuItem` */; +/*!50003 DROP PROCEDURE IF EXISTS `GetOptionsForOrderItem` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; @@ -823,11 +901,11 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetOptionsForMenuItem`(IN iID INT) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetOptionsForOrderItem`(IN oItemID INT) BEGIN SELECT * FROM Options - WHERE optionID IN ( SELECT * FROM Options JOIN ItemHasOptions ON ItemHasOptions.itemID = iID); + WHERE optionID IN (SELECT OrderItemHasOptions.optionID FROM OrderItemHasOptions WHERE OrderItemHasOptions.orderItemID = oItemID); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -855,6 +933,26 @@ DELIMITER ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP PROCEDURE IF EXISTS `GetOrdersInPast24Hours` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetOrdersInPast24Hours`(IN uID INT) +BEGIN + SELECT * FROM Orders + WHERE orderTime >= NOW() - INTERVAL 1 DAY AND userID = uID; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `GetRestaurantByName` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -896,6 +994,46 @@ DELIMITER ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP PROCEDURE IF EXISTS `GetTableByAlexaID` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetTableByAlexaID`(IN aID VARCHAR(100)) +BEGIN + SELECT tableID + FROM AutoGarcon.RestaurantTables WHERE alexaID = aID; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP PROCEDURE IF EXISTS `GetTableByQRCode` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetTableByQRCode`(IN qCode VARCHAR(100)) +BEGIN + SELECT tableID + FROM AutoGarcon.RestaurantTables WHERE qrCode = qCode; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `GetTotalPriceOfOrder` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -908,13 +1046,12 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetTotalPriceOfOrder`(IN orderIDToGet INT) BEGIN - DECLARE itemBaseCost, optionsCost, costBeforeTax, salesTaxCost, totalCost INT; + DECLARE itemBaseCost, optionsCost, costBeforeTax, salesTaxCost, totalCost DECIMAL(10,2); DECLARE taxPercent DECIMAL(10,2); -- Get cost of all items together -- - SELECT SUM(MenuContains.price * OrderItem.quantity) INTO itemBaseCost + SELECT SUM(OrderItem.price * OrderItem.quantity) INTO itemBaseCost FROM OrderItem - JOIN MenuContains ON OrderItem.menuItemID = MenuContains.menuItemID WHERE orderID = orderIDToGet; -- Get cost of all options added to items -- @@ -934,7 +1071,13 @@ BEGIN SET salesTaxCost = costBeforeTax * taxPercent; SET totalCost = costBeforeTax + salesTaxCost; - SELECT totalCost; + -- store in temp table for outer calls to use + DROP TABLE IF EXISTS tmp; + CREATE TEMPORARY TABLE tmp(c1 DECIMAL(10,2), c2 DECIMAL(10,2), c3 DECIMAL(10,2)); + INSERT INTO tmp(c1,c2,c3) + VALUES(totalCost,salesTaxCost,costBeforeTax); + + SELECT totalCost, salesTaxCost, costBeforeTax; END ;; DELIMITER ; @@ -973,11 +1116,34 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetUserIdByEmail`(IN email VARCHAR(45) ) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `GetUserIdByEmail`(IN emailAddress VARCHAR(45) ) BEGIN SELECT userID FROM Users - WHERE email = email; + WHERE email = emailAddress; +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 DROP PROCEDURE IF EXISTS `MarkOrderReady` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb4 */ ; +/*!50003 SET character_set_results = utf8mb4 */ ; +/*!50003 SET collation_connection = utf8mb4_0900_ai_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +CREATE DEFINER=`masterUser`@`%` PROCEDURE `MarkOrderReady`(IN oID INT) +BEGIN + -- Mark the order status to be ready to go out to a table + UPDATE Orders + SET orderStatus = 1 + WHERE orderID = oID; + END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -996,9 +1162,9 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`masterUser`@`%` PROCEDURE `RemoveMenu`(IN mID INT) BEGIN - DELETE FROM MenuContains WHERE menuID = mID; - DELETE FROM MenuTimes WHERE menuID = mID; - DELETE FROM Menu WHERE menuID = mID; + UPDATE Menu + SET menuStatus = 0 + WHERE menuID = mID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -1017,8 +1183,9 @@ DELIMITER ; DELIMITER ;; CREATE DEFINER=`masterUser`@`%` PROCEDURE `RemoveMenuItem`(IN iID INT) BEGIN - DELETE FROM MenuContains WHERE menuItemID = iID; - DELETE FROM MenuItem WHERE itemID = iID; + UPDATE MenuItem + SET itemStatus = 0 + WHERE itemID = iID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -1035,10 +1202,10 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `RemoveMenuTime`(IN timeID INT) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `RemoveMenuTime`(IN tID INT) BEGIN DELETE FROM MenuTimes - WHERE (timeID = timeID); + WHERE (timeID = tID); END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -1055,9 +1222,11 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `RemoveOption`(IN optionID INT ) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `RemoveOption`(IN oID INT ) BEGIN - DELETE FROM Options WHERE optionID = optionID; + UPDATE Options + SET optionStatus = 0 + WHERE optionID = oID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -1074,9 +1243,10 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; -CREATE DEFINER=`masterUser`@`%` PROCEDURE `RemoveUser`(IN userID INT ) +CREATE DEFINER=`masterUser`@`%` PROCEDURE `RemoveUser`(IN uID INT ) BEGIN - DELETE FROM Users WHERE userID = userID; + DELETE FROM Orders WHERE userID = uID; + DELETE FROM Users WHERE userID = uID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -1098,7 +1268,7 @@ BEGIN INSERT into MenuTimes(menuID, startTime, endTime) VALUES (menuID, startTime, endTime); - SELECT LAST_INSERT_ID(); + SELECT LAST_INSERT_ID() AS newTimeID; END ;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; @@ -1120,7 +1290,7 @@ BEGIN INSERT INTO MenuContains(menuID, menuItemID, price) VALUES (mID, iID, iPrice); - SELECT iID; + SELECT LAST_INSERT_ID() AS newMenuContainsID; END ;; DELIMITER ; @@ -1139,4 +1309,4 @@ SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2020-04-01 15:55:38 +-- Dump completed on 2020-04-21 13:07:03