-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 16, 2025 at 08:28 PM
-- Server version: 10.4.28-MariaDB
-- PHP Version: 8.0.28

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `enandinidb`
--

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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `categorieId` int(12) NOT NULL,
  `categorieName` varchar(255) NOT NULL,
  `categorieDesc` text NOT NULL,
  `categorieCreateDate` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`categorieId`, `categorieName`, `categorieDesc`, `categorieCreateDate`) VALUES
(1, 'BUTTER', 'A delight for veggie lovers! Choose from our wide range of delicious vegetarian pizzas, it\'s softer and tastier', '2025-03-13 18:16:28'),
(2, 'CURD', 'Choose your favourite non-veg pizzas from the Domino\'s Pizza menu. Get fresh non-veg pizza with your choice of crusts & toppings', '2025-03-13 18:17:14'),
(3, 'DAIRY', 'Indulge into mouth-watering taste of Pizza mania range, perfect answer to all your food cravings', '2025-03-13 18:17:43'),
(4, 'FLV MILK', 'Complement your pizza with wide range of sides available at Domino\'s Pizza India', '2025-03-13 18:19:10'),
(5, 'GHEE', 'Complement your pizza with wide range of beverages available at Domino\'s Pizza India', '2025-03-13 21:58:58'),
(6, 'MILK', 'Fresh Pan Pizza Tastiest Pan Pizza. ... Domino\'s freshly made pan-baked pizza; deliciously soft ,buttery,extra cheesy and delightfully crunchy.', '2021-03-18 07:55:28'),
(7, 'ICE CREAM', 'Domino’s Pizza Introducing all new Burger Pizza with the tag line looks like a burger, tastes like a pizza. Burger Pizza is burger sized but comes in a small pizza box. It is come with pizza toppings such as herbs, vegetables, tomato sauce and mozzarella,', '2021-03-18 08:06:30'),
(8, 'PANEER', 'CHOICE OF TOPPINGS', '2021-03-18 08:13:47'),
(9, 'POWDER', 'A delight for veggie lovers! Choose from our wide range of delicious vegetarian pizzas, it\'s softer and tastier', '0000-00-00 00:00:00'),
(10, 'SWEETS', 'A delight for veggie lovers! Choose from our wide range of delicious vegetarian pizzas, it\'s softer and tastier', '0000-00-00 00:00:00'),
(22, 'testcategories', 'desc 12345', '2025-03-16 23:14:48');

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

--
-- Table structure for table `contact`
--

CREATE TABLE `contact` (
  `contactId` int(21) NOT NULL,
  `userId` int(21) NOT NULL,
  `email` varchar(35) NOT NULL,
  `phoneNo` bigint(21) NOT NULL,
  `orderId` int(21) NOT NULL DEFAULT 0 COMMENT 'If problem is not related to the order then order id = 0',
  `message` text NOT NULL,
  `time` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `contactreply`
--

CREATE TABLE `contactreply` (
  `id` int(21) NOT NULL,
  `contactId` int(21) NOT NULL,
  `userId` int(23) NOT NULL,
  `message` text NOT NULL,
  `datetime` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `deliverydetails`
--

CREATE TABLE `deliverydetails` (
  `id` int(21) NOT NULL,
  `orderId` int(21) NOT NULL,
  `deliveryBoyName` varchar(35) NOT NULL,
  `deliveryBoyPhoneNo` bigint(25) NOT NULL,
  `deliveryTime` int(200) NOT NULL COMMENT 'Time in minutes',
  `dateTime` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `deliverydetails`
--

INSERT INTO `deliverydetails` (`id`, `orderId`, `deliveryBoyName`, `deliveryBoyPhoneNo`, `deliveryTime`, `dateTime`) VALUES
(1, 4, 'kumar', 9900990099, 15, '2025-03-16 18:15:59'),
(2, 3, 'ravikumar', 9900225325, 12, '2025-03-16 18:27:14');

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

--
-- Table structure for table `orderitems`
--

CREATE TABLE `orderitems` (
  `id` int(21) NOT NULL,
  `orderId` int(21) NOT NULL,
  `pId` int(21) NOT NULL,
  `itemQuantity` int(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `orderitems`
--

INSERT INTO `orderitems` (`id`, `orderId`, `pId`, `itemQuantity`) VALUES
(1, 2, 2, 2),
(2, 3, 2, 2),
(3, 3, 7, 2),
(4, 4, 4, 2),
(5, 4, 1, 1),
(6, 5, 5, 1),
(7, 5, 10, 2),
(8, 6, 6, 2),
(9, 7, 1, 1),
(10, 7, 3, 1),
(11, 7, 4, 2);

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

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `orderId` int(21) NOT NULL,
  `userId` int(21) NOT NULL,
  `address` varchar(255) NOT NULL,
  `zipCode` int(21) NOT NULL,
  `phoneNo` bigint(21) NOT NULL,
  `amount` int(200) NOT NULL,
  `paymentMode` enum('0','1') NOT NULL DEFAULT '0' COMMENT '0=cash on delivery, \r\n1=online ',
  `orderStatus` enum('0','1','2','3','4','5','6') NOT NULL DEFAULT '0' COMMENT '0=Order Placed.\r\n1=Order Confirmed.\r\n2=Preparing your Order.\r\n3=Your order is on the way!\r\n4=Order Delivered.\r\n5=Order Denied.\r\n6=Order Cancelled.',
  `orderDate` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `orders`
--

INSERT INTO `orders` (`orderId`, `userId`, `address`, `zipCode`, `phoneNo`, `amount`, `paymentMode`, `orderStatus`, `orderDate`) VALUES
(1, 2, 'BLDEA\'s ladies hostel ,Near Mallikarjun Ashram, ', 586103, 9900225325, 90, '0', '0', '2025-03-16 07:56:15'),
(2, 2, 'BLDEA\'s ladies hostel ,Near Mallikarjun Ashram, ', 586103, 9900225325, 90, '0', '0', '2025-03-16 11:13:00'),
(3, 3, 'BLDEA\'s ladies hostel ,Near Mallikarjun Ashram, ', 586103, 8660441890, 150, '0', '4', '2025-03-16 15:43:48'),
(4, 4, 'BLDEA ladies hostel Near Mallikarjun Ashram, ', 586103, 9999999999, 330, '0', '3', '2025-03-16 17:58:23'),
(5, 4, 'water tank, ', 586100, 9900225325, 1305, '0', '0', '2025-03-16 18:33:13'),
(6, 5, 'Plot No 22 Ganesh Nagar Bijapur Near BLDEs Eng ColgVijayapura', 586131, 1234123412, 102, '0', '1', '2025-03-16 19:02:20'),
(7, 2, 'Plot No 26 Vishweshwarayya Nagar Bijapur and BLDEAs ladies hostel Near Mallikarjun Ashram', 586103, 1234567890, 550, '0', '0', '2025-03-17 00:17:43');

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

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `pId` int(12) NOT NULL,
  `pName` varchar(255) NOT NULL,
  `pPrice` int(12) NOT NULL,
  `pDesc` text NOT NULL,
  `pCategorieId` int(12) NOT NULL,
  `pPubDate` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`pId`, `pName`, `pPrice`, `pDesc`, `pCategorieId`, `pPubDate`) VALUES
(1, 'UNSALTED BUTTER 500 GM', 280, 'Creamy, Pure & Versatile', 1, '2025-03-13 21:03:26'),
(2, 'Butter Milk-200', 45, 'Pure, Fresh & Nutritious', 2, '2025-03-13 21:20:58'),
(3, 'Kaju Katli 200 GM', 220, 'A Kaju katli that goes ballistic on veggies! Check out this mouth watering overload of fresh ', 3, '2025-03-13 21:22:07'),
(4, 'Flv Tetra Pista', 25, 'Refreshing, Creamy & Nutty', 4, '2025-03-13 21:23:05'),
(5, 'Ghee-200ml', 145, 'Aromatic, Pure & Healthy', 5, '2025-03-13 21:23:48'),
(6, 'SHUBHAM 1050ml', 51, 'Pure, Fresh & Nutritious', 6, '2025-03-13 21:24:38'),
(7, 'BUTTERSCOTCH CONE 120ML', 30, 'Too Testy BUTTERSCOTCH CONE ', 7, '2025-03-13 21:25:42'),
(8, 'Paneer 1kg', 425, 'fresh Soft and Testy ', 8, '2025-03-13 21:26:31'),
(9, 'SMP 100gm', 400, 'Smooth powder', 9, '2025-03-13 21:27:21'),
(10, 'Kunda 250g', 580, 'Rich, Traditional & Flavorful', 10, '2025-03-13 21:28:06'),
(69, 'Peda-Half KG', 100, 'Test', 10, '2025-03-16 23:32:20');

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

--
-- Table structure for table `sitedetail`
--

CREATE TABLE `sitedetail` (
  `tempId` int(11) NOT NULL,
  `systemName` varchar(21) NOT NULL,
  `email` varchar(35) NOT NULL,
  `contact1` bigint(21) NOT NULL,
  `contact2` bigint(21) DEFAULT NULL COMMENT 'Optional',
  `address` text NOT NULL,
  `dateTime` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `sitedetail`
--

INSERT INTO `sitedetail` (`tempId`, `systemName`, `email`, `contact1`, `contact2`, `address`, `dateTime`) VALUES
(1, 'e-Nandini', 'admin@gmail.com', 9900225325, 9900225325, 'Ashram Road ,Vijayapura', '2025-03-15 19:56:25');

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(21) NOT NULL,
  `username` varchar(21) NOT NULL,
  `firstName` varchar(21) NOT NULL,
  `lastName` varchar(21) NOT NULL,
  `email` varchar(35) NOT NULL,
  `phone` bigint(20) NOT NULL,
  `userType` enum('0','1') NOT NULL DEFAULT '0' COMMENT '0=user\r\n1=admin',
  `password` varchar(255) NOT NULL,
  `joinDate` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `firstName`, `lastName`, `email`, `phone`, `userType`, `password`, `joinDate`) VALUES
(1, 'admin', 'admin', 'admin', 'admin@gmail.com', 1111111111, '1', '$2a$12$MjGWk0sHDk16XC.k6jFtwO1eMvn3zbP/bpma0npRfqiY6VQDVGQ3e', '2021-04-11 11:40:58'),
(2, 'kumar', 'kumar', 'patil', 'kumar@gmail.com', 9900990099, '0', '$2y$10$8WBzSTv4FTHChGmgZfpfW.VSH5BLW5Hrzq0AIKABuDaQOLsxActnm', '2025-03-16 07:38:18'),
(3, 'avinash', 'avinash', 'p', 'avinash@gmail.com', 8660441890, '0', '$2y$10$W7rV1B./tGpb9clBz6Fq.uGdVf.Bus77BkY/YB68k0mMg5A3AHwXe', '2025-03-16 15:40:49'),
(4, 'prashant', 'prashant', 'h', 'p@gmail.com', 9999999999, '0', '$2y$10$cXMoVcFphDwwMMwLNO1TduU0Ulxg4Gm4tg49BwsSwuDSX.cRbXLuO', '2025-03-16 17:57:01'),
(5, 'krishna', 'krishna', 'p', 'krishna@gmail.com', 1234123412, '0', '$2y$10$uVoLM3b7gYJV1jkYBSWFju7nIIRx1Nyj4JMW3vUgv0WxwXcwiHhg6', '2025-03-16 18:55:46');

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

--
-- Table structure for table `viewcart`
--

CREATE TABLE `viewcart` (
  `cartItemId` int(11) NOT NULL,
  `pId` int(11) NOT NULL,
  `itemQuantity` int(100) NOT NULL,
  `userId` int(11) NOT NULL,
  `addedDate` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `viewcart`
--

INSERT INTO `viewcart` (`cartItemId`, `pId`, `itemQuantity`, `userId`, `addedDate`) VALUES
(3, 3, 2, 3, '2025-03-16 17:16:20');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`categorieId`);
ALTER TABLE `categories` ADD FULLTEXT KEY `categorieName` (`categorieName`,`categorieDesc`);

--
-- Indexes for table `contact`
--
ALTER TABLE `contact`
  ADD PRIMARY KEY (`contactId`);

--
-- Indexes for table `contactreply`
--
ALTER TABLE `contactreply`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deliverydetails`
--
ALTER TABLE `deliverydetails`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `orderId` (`orderId`);

--
-- Indexes for table `orderitems`
--
ALTER TABLE `orderitems`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`orderId`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`pId`);
ALTER TABLE `products` ADD FULLTEXT KEY `pName` (`pName`,`pDesc`);

--
-- Indexes for table `sitedetail`
--
ALTER TABLE `sitedetail`
  ADD PRIMARY KEY (`tempId`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`) USING BTREE,
  ADD UNIQUE KEY `username` (`username`);

--
-- Indexes for table `viewcart`
--
ALTER TABLE `viewcart`
  ADD PRIMARY KEY (`cartItemId`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `categorieId` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `contact`
--
ALTER TABLE `contact`
  MODIFY `contactId` int(21) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `contactreply`
--
ALTER TABLE `contactreply`
  MODIFY `id` int(21) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deliverydetails`
--
ALTER TABLE `deliverydetails`
  MODIFY `id` int(21) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `orderitems`
--
ALTER TABLE `orderitems`
  MODIFY `id` int(21) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `orderId` int(21) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `pId` int(12) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=70;

--
-- AUTO_INCREMENT for table `sitedetail`
--
ALTER TABLE `sitedetail`
  MODIFY `tempId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int(21) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `viewcart`
--
ALTER TABLE `viewcart`
  MODIFY `cartItemId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
