-- https://www.phpmyadmin.net/
--

START TRANSACTION;



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

--
-- Table structure for table `cart`
--

CREATE TABLE `cart` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `category`
--

CREATE TABLE `category` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `photo` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `status` enum('0','1') NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `category`
--

INSERT INTO `category` (`id`, `name`, `photo`, `description`, `status`) VALUES
(1, 'Food, grains and oils', 'foodgrains.png', 'Food, grains, pulses and oils', '1'),
(2, 'Beverages and Snacks', 'beverages_snacks.jpg', 'Beverages and Snacks', '1'),
(3, 'Fruits and Vegetables', 'fruits_vegetables.jpg', 'Fruits and Vegetables', '1'),
(4, 'Personal care and Baby care', 'babycare.jpg', 'Personal care and Baby care products', '1');

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

--
-- Table structure for table `details`
--

CREATE TABLE `details` (
  `id` int(11) NOT NULL,
  `sales_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `details`
--

INSERT INTO `details` (`id`, `sales_id`, `product_id`, `quantity`) VALUES
(14, 9, 11, 2),
(15, 9, 13, 5),
(16, 9, 3, 2),
(17, 9, 1, 3),
(18, 10, 13, 3),
(19, 10, 2, 4),
(20, 10, 19, 5);

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

--
-- Table structure for table `orderproducts`
--

CREATE TABLE `orderproducts` (
  `opid` int(11) NOT NULL,
  `orderid` int(11) NOT NULL,
  `productid` int(11) NOT NULL,
  `productname` varchar(100) NOT NULL,
  `quantity` int(11) NOT NULL,
  `rate` float(10,2) NOT NULL,
  `cost` float(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `orderproducts`
--

INSERT INTO `orderproducts` (`opid`, `orderid`, `productid`, `productname`, `quantity`, `rate`, `cost`) VALUES
(1, 1, 1, 'productname', 3, 1.00, 2.00),
(2, 1, 1, 'productname', 3, 1.00, 2.00),
(3, 1, 1, 'productname', 3, 1.00, 2.00),
(4, 1, 1, 'productname', 3, 1.00, 2.00),
(5, 1, 1, 'productname', 3, 1.00, 2.00),
(6, 1, 1, 'productname', 3, 1.00, 2.00),
(7, 5, 1, '', 1, 2.00, 2.00),
(8, 5, 1, '', 1, 2.00, 2.00),
(9, 5, 1, '', 1, 40.00, 40.00),
(10, 5, 1, '', 2, 120.00, 240.00),
(11, 5, 1, '', 1, 2.00, 2.00),
(12, 6, 1, 'Brinjal', 1, 2.00, 2.00),
(13, 6, 1, 'Brinjal', 1, 2.00, 2.00),
(14, 6, 1, 'Sweet Corn', 1, 40.00, 40.00),
(15, 6, 1, 'Grapes', 2, 120.00, 240.00),
(16, 6, 1, 'Brinjal', 1, 2.00, 2.00),
(17, 7, 1, 'Brinjal', 1, 2.00, 2.00),
(18, 7, 1, 'Brinjal', 1, 2.00, 2.00),
(19, 7, 1, 'Sweet Corn', 1, 40.00, 40.00),
(20, 7, 1, 'Grapes', 2, 120.00, 240.00),
(21, 7, 1, 'Brinjal', 1, 2.00, 2.00),
(22, 8, 1, 'Tomato', 2, 60.00, 120.00),
(23, 8, 1, 'Onion', 1, 30.00, 30.00),
(24, 8, 1, 'Potato', 1, 40.00, 40.00),
(25, 9, 1, 'Organic Sugar – 500g', 1, 38.00, 38.00),
(26, 9, 1, 'Organic Sugar – 1kg', 1, 38.00, 38.00),
(27, 9, 1, 'Organic Jaggery Powder – 500g', 2, 32.00, 64.00),
(28, 11, 1, 'Papaya', 1, 120.00, 120.00),
(29, 11, 1, 'Grapes', 1, 120.00, 120.00),
(30, 13, 1, 'Organic Jowar Flour – 500g', 1, 25.00, 25.00),
(31, 13, 1, 'Organic Sugar – 500g', 3, 38.00, 114.00),
(32, 14, 29, 'Organic Whole Wheat Flour (Chakki Atta) – 1Kg', 3, 30.00, 90.00),
(33, 14, 27, 'Organic Whole Wheat Flour (Chakki Atta) – 2Kg', 2, 60.00, 120.00),
(34, 14, 17, 'AMAZON Fire 7 Tablet with Alexa (2017) - 8 GB, Black', 2, 100.00, 200.00);

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

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

CREATE TABLE `orders` (
  `orderid` int(11) NOT NULL,
  `uid` int(11) NOT NULL,
  `prodid` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `totalcost` decimal(10,0) NOT NULL,
  `discost` decimal(10,0) NOT NULL,
  `orderdate` datetime NOT NULL,
  `orderconfirm` char(1) NOT NULL,
  `sellerid` int(11) NOT NULL,
  `remark` varchar(200) NOT NULL,
  `createdon` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `orders` (`orderid`, `uid`, `prodid`, `quantity`, `totalcost`, `discost`, `orderdate`, `orderconfirm`, `sellerid`, `remark`, `createdon`) VALUES
(1, 2, 3, 4, 5, 6, '2020-07-23 00:00:00', 'Y', 1, 'remark', '2020-07-11 00:00:00'),
(2, 13, 3, 0, 0, 0, '2020-07-11 17:39:47', 'Y', 1, 'remark', '2020-07-11 17:39:47'),
(3, 14, 3, 0, 0, 0, '2020-07-11 17:40:08', 'Y', 1, 'remark', '2020-07-11 17:40:08'),
(4, 15, 3, 0, 0, 0, '2020-07-11 18:00:26', 'Y', 1, 'remark', '2020-07-11 18:00:26'),
(5, 16, 3, 6, 286, 58, '2020-07-11 18:00:53', 'Y', 1, 'remark', '2020-07-11 18:00:53'),
(6, 17, 3, 6, 286, 58, '2020-07-11 18:06:18', 'Y', 1, 'remark', '2020-07-11 18:06:18'),
(7, 18, 3, 6, 286, 58, '2020-07-11 18:08:51', 'Y', 1, 'remark', '2020-07-11 18:08:51'),
(8, 19, 3, 4, 190, 25, '2020-07-12 07:23:03', 'Y', 1, 'remark', '2020-07-12 07:23:03'),
(9, 21, 3, 4, 140, 17, '2020-07-12 08:33:37', 'Y', 1, 'remark', '2020-07-12 08:33:37'),
(10, 22, 3, 0, 0, 0, '2020-07-12 08:35:51', 'Y', 1, 'remark', '2020-07-12 08:35:51'),
(11, 23, 3, 2, 240, 61, '2020-07-12 08:38:25', 'Y', 1, 'remark', '2020-07-12 08:38:25'),
(12, 24, 3, 0, 0, 0, '2020-07-12 08:39:14', 'Y', 1, 'remark', '2020-07-12 08:39:14'),
(13, 25, 3, 4, 139, 6, '2020-07-12 08:46:06', 'Y', 1, 'remark', '2020-07-12 08:46:06'),
(14, 26, 3, 7, 410, 33, '2020-07-12 09:33:44', 'Y', 1, 'remark', '2020-07-12 09:33:44');

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

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

CREATE TABLE `products` (
  `id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `description` text NOT NULL,
  `slug` varchar(200) NOT NULL,
  `oldprice` double(10,2) NOT NULL,
  `newprice` double(10,2) NOT NULL,
  `discount` int(11) NOT NULL,
  `offer` varchar(50) NOT NULL,
  `quantity` int(11) NOT NULL,
  `UOM` varchar(20) NOT NULL,
  `minstock` int(11) NOT NULL,
  `photo1` varchar(200) NOT NULL,
  `photo2` varchar(50) NOT NULL,
  `photo3` varchar(50) NOT NULL,
  `createdon` datetime NOT NULL,
  `counter` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `products` (`id`, `category_id`, `name`, `description`, `slug`, `oldprice`, `newprice`, `discount`, `offer`, `quantity`, `UOM`, `minstock`, `photo1`, `photo2`, `photo3`, `createdon`, `counter`) VALUES
(1, 3, 'Fresh Broccoli', '<p>Fresh Broccoli from Direct Farm</p>\r\n', '', 90.00, 80.00, 0, '20% off', 20, 'Kg', 0, 'photo1_1_2020-06-18-14-05-21.jpg', '', '', '2018-07-09 00:00:00', 2),
(2, 3, 'Mutter', '<p>Fresh Mutter from Organic Farm</p>\r\n', '', 69.00, 40.00, 15, '15% Off', 20, 'Kg', 5, 'photo1_2_2020-06-18-10-28-30.jpg', '', '', '2018-05-10 00:00:00', 3),
(3, 3, 'Fresh Coriander', '<p>Fresh Coriander - Hara Dhania</p>\r\n', '', 30.00, 20.00, 0, '15% Off', 40, 'Gm', 5, 'photo1_3_2020-06-18-10-43-02.jpg', '', '', '2018-05-12 00:00:00', 1),
(4, 3, 'Flower', '<p>Fresh Flower</p>\r\n', '', 80.00, 60.00, 0, '15% Off', 40, 'Kg', 5, 'photo1_4_2020-06-18-10-47-55.jpg', '', '', '2018-05-10 00:00:00', 3),
(5, 3, 'Potato', '<p>Fresh Potato</p>\r\n', '', 45.00, 40.00, 0, '.', 40, 'Kg', 10, 'photo1_5_2020-06-18-10-53-34.jpg', '', '', '2018-07-09 00:00:00', 3),
(6, 3, 'Onion', '<p>Dry Red Onion from Nashik</p>\r\n', '', 30.00, 30.00, 0, '15% Off', 50, 'Kg', 10, 'photo1_6_2020-06-18-11-02-30.jpg', '', '', '0000-00-00 00:00:00', 0),
(7, 3, 'Tomato', ' <p>Fresh Tomatos</p>\r\n', '', 80.00, 60.00, 0, '.', 60, 'Kg', 5, 'photo1_7_2020-06-18-11-22-54.jpg', 'photo2_7_2020-06-18-11-22-54.jpg', '', '0000-00-00 00:00:00', 0),
(8, 3, 'Grapes', ' <p>Black color Grapes</p>\r\n', '', 160.00, 120.00, 0, '15% Off', 40, 'Kg', 5, 'photo1_8_2020-06-18-13-55-33.jpg', '', '', '0000-00-00 00:00:00', 0),
(9, 3, 'Papaya', '<p>Papaya organic</p>\r\n', '', 140.99, 120.00, 0, '15% Off', 40, 'Kg', 5, 'photo1_9_2020-06-18-13-57-13.jpg', '', '', '0000-00-00 00:00:00', 0),
(10, 3, 'Sweet Corn', '<p>Sweet&nbsp; Corn</p>\r\n', '', 60.99, 40.00, 0, '15% Off', 40, 'Kg', 5, 'photo1_10_2020-06-18-13-58-34.jpg', '', '', '2018-05-10 00:00:00', 1),
(11, 1, 'Organic Broken Rice', '<h2>Organic Broken Rice</h2>\r\n\r\n<p>Broken rice grains are obtained after a rice milling process. Being completely natural, they retain their original texture and other nutritional benefits.</p>\r\n', '', 60.98, 58.00, 0, '15% Off', 50, 'Kg', 5, 'photo1_11_2020-06-24-16-03-31.jpg', '', '', '2018-05-12 00:00:00', 1),
(12, 1, 'Organic Brown Basmati Rice', '<h2>Organic Brown Basmati Rice</h2>\r\n\r\n<p>Organic Brown Basmati Rice has no artificial additives and has the lowest starch content. This is definitely a healthy addition to your meal.</p>\r\n', '', 120.99, 100.00, 0, '15% Off', 100, 'Kg', 10, 'photo1_12_2020-06-24-16-06-46.jpg', '', '', '2018-05-12 00:00:00', 3),
(13, 1, 'Organic Idli Rice', '<h2>Organic Idli Rice</h2>\r\n\r\n<p>Idli rice is a major ingredient used for the preparation of idli (rice cakes), a traditional Indian savoury. Organic Idli Rice grains are acquired naturally and no chemicals are added while processing them.</p>\r\n', '', 120.99, 100.00, 0, '15% Off', 100, 'Kg', 10, 'photo1_13_2020-06-24-16-18-00.jpg', '', '', '2018-05-12 00:00:00', 1),
(14, 1, 'Organic Poha', '<h2>Organic Poha</h2>\r\n\r\n<p>Organic Poha is made of de-husked and flattened rice grains. It acts as a compliment to/for a high protein, fibre diet. A very common breakfast ingredient, it is free from any kind of chemicals or polishing.</p>\r\n', '', 60.99, 48.00, 0, '15% Off', 100, 'Kg', 10, 'photo1_14_2020-06-24-16-39-24.jpg', '', '', '2018-05-10 00:00:00', 13),
(15, 1, 'Organic Red Poha', '<h2>Organic Red Poha</h2>\r\n\r\n<p>Our Organic Red Poha is naturally obtained and is very healthy. It is free from all forms of additives and chemicals.</p>\r\n', '', 90.99, 60.00, 0, '15% Off', 1000, 'Kg', 10, 'photo1_15_2020-06-24-16-41-14.jpg', '', '', '2018-07-09 00:00:00', 1),
(16, 1, 'Organic Red Rice', '<h2>Organic Red Rice</h2>\r\n\r\n<p>Red rice is a partially hulled rice variety with a nutty flavour. Organic red rice has a higher nutrient content than other generic varieties.</p>\r\n', '', 100.99, 80.00, 0, '15% Off', 1000, 'Kg', 10, 'photo1_16_2020-06-24-16-42-35.jpg', '', '', '2018-05-10 00:00:00', 2),
(17, 1, 'AMAZON Fire 7 Tablet with Alexa (2017) - 8 GB, Black', '<h2>Organic White Basmati Rice</h2>\r\n\r\n<p>Organic White Basmati Rice rice is very popular for it&rsquo;s enchanting aroma after being cooked. It has no artificial additives or harmful pesticides.</p>\r\n', '', 120.99, 100.00, 0, '15% Off', 100, 'Kg', 10, 'photo1_17_2020-06-24-16-44-45.jpg', '', '', '2018-05-12 00:00:00', 1),
(18, 1, 'Organic Wheat Whole', '<h2>Organic Wheat Whole &ndash; 1kg</h2>\r\n\r\n<p>Organic Whole Wheat is 100% stone ground with all of the nutrients and vitamins intact. It is ground without any synthetic pesticides or genetically modified seeds.</p>\r\n', '', 39.99, 30.00, 0, '15% Off', 200, 'Kg', 20, 'photo1_18_2020-06-24-16-48-21.jpg', '', '', '2018-05-12 00:00:00', 2),
(19, 1, 'Organic Suji – 500g', '<h2>Organic Suji &ndash; 500g</h2>\r\n\r\n<p>Organic Suji is completely pesticide-free, unadulterated and with no presence of additives or chemicals. Weight-watchers, you will definitely enjoy this!</p>\r\n', '', 29.99, 25.00, 0, '15% Off', 500, 'Gm', 5, 'photo1_19_2020-06-24-16-52-31.jpg', '', '', '2018-05-10 00:00:00', 1),
(20, 1, 'Organic Besan', '<h2>Organic Besan</h2>\r\n\r\n<p>Organic Besan is a ground form of organically grown Chana Dal. It has a strong, nutty flavour and is used as a prominent ingredient in a lot of Indian snacks.</p>\r\n', '', 39.00, 30.00, 0, '.', 100, 'Gm', 10, 'photo1_20_2020-06-24-16-54-36.jpg', '', '', '2018-05-12 00:00:00', 1),
(27, 1, 'Organic Whole Wheat Flour (Chakki Atta) – 2Kg', '<h1>Organic Whole Wheat Flour (Chakki Atta) &ndash; 2Kg</h1>\r\n\r\n<p>Organic Wheat Flour is processed in the utmost care in a completely hygenic environment to give you the finest product possible. Your healthy diet is in good hands.</p>\r\n', '', 69.00, 60.00, 0, '.', 200, 'Kg', 20, 'photo1_27_2020-06-24-16-56-51.png', '', '', '2018-07-09 00:00:00', 9),
(28, 1, 'Organic Jowar Flour – 500g', '<h2>Organic Jowar Flour &ndash; 500g</h2>\r\n\r\n<p>Organic Jowar is grown without synthetic pesticides making it a very rich source of vitamin B &amp; E complex. Jowar flour rotis are a staple meal constituent in rural India.</p>\r\n', '', 29.00, 25.00, 0, '.', 120, 'Gm', 10, 'photo1_28_2020-06-24-17-10-28.jpg', '', '', '0000-00-00 00:00:00', 0),
(29, 1, 'Organic Whole Wheat Flour (Chakki Atta) – 1Kg', '<h2>Organic Whole Wheat Flour (Chakki Atta) &ndash; 1Kg</h2>\r\n\r\n<p>Organic Wheat Flour is processed in the utmost care in a completely hygenic environment to give you the finest product possible. Your healthy diet is in good hands.</p>\r\n', '', 32.99, 30.00, 0, '.', 100, 'Kg', 10, 'photo1_29_2020-06-24-17-07-46.jpg', '', '', '2018-07-09 00:00:00', 3),
(32, 1, 'Organic Jaggery Powder – 500g', '<h2>Organic Jaggery Powder&nbsp;&ndash; 500g</h2>\r\n\r\n<p>Jaggery holds a very important place in the medicinal and culinary industry. The jaggery offered to you is nutritious and chemical-free. Organic jaggery powder is extracted from the most nutritious sugar canes to ensure that it is free from any chemicals.</p>\r\n', '', 40.00, 32.00, 0, '.', 400, 'Gm', 6, 'photo1_32_2020-06-24-17-26-15.jpg', 'about-us-why-choose-us.png', '11.png', '2020-06-15 11:26:28', 1),
(33, 1, 'Organic Sugar – 1kg', '<h2>Organic Sugar &ndash; 1kg</h2>\r\n\r\n<p>Organic Sugar is obtained from freshly squeezed, evaporated and crystallized sugar cane juice. It is harvested to retain every ounce of its sweetness.</p>\r\n', '', 45.00, 38.00, 0, '15% Off', 400, 'Kg', 5, 'photo1_33_2020-06-24-17-24-45.jpg', 'about-us-why-choose-us.png', '11.png', '2020-06-15 11:28:02', 1),
(34, 1, 'Organic Sugar – 500g', '<h2>Organic Sugar &ndash; 500g</h2>\r\n\r\n<p>Organic Sugar is obtained from freshly squeezed, evaporated and crystallized sugar cane juice. It is harvested to retain every ounce of it&rsquo;s sweetness.</p>\r\n', '', 40.00, 38.00, 0, '.', 400, 'Gm', 10, 'photo1_34_2020-06-24-17-13-05.jpg', 'photo2_10034_2020-06-15-11-29-46.png', 'photo3_10034_2020-06-15-11-29-46.png', '2020-06-15 11:29:46', 1),
(35, 1, 'Organic Black Mustard – 100g', '<p>Organic Black Mustard Seeds are essential spices in lots of regional cuisines. Black mustard adds a unique flavour. It is used widely in &lsquo;Panch Phoran&rsquo; spice blend. This spice blend can be utilized to make fish, vegetables and other non-vegetarian curry dishes.</p>\r\n', '', 120.99, 100.00, 0, '.', 100, 'Gm', 10, 'photo1_35_2020-07-12-09-50-55.png', 'photo2_35_2020-07-12-09-50-55.jpg', '', '2020-07-12 09:50:55', 1);

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

--
-- Table structure for table `sales`
--

CREATE TABLE `sales` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `pay_id` varchar(50) NOT NULL,
  `sales_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sales`
--

INSERT INTO `sales` (`id`, `user_id`, `pay_id`, `sales_date`) VALUES
(9, 9, 'PAY-1RT494832H294925RLLZ7TZA', '2018-05-10'),
(10, 9, 'PAY-21700797GV667562HLLZ7ZVY', '2018-05-10');

--
-- Indexes for dumped tables
--

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

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

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

--
-- Indexes for table `orderproducts`
--
ALTER TABLE `orderproducts`
  ADD PRIMARY KEY (`opid`);

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `cart`
--
ALTER TABLE `cart`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `category`
--
ALTER TABLE `category`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

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

--
-- AUTO_INCREMENT for table `orderproducts`
--
ALTER TABLE `orderproducts`
  MODIFY `opid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `orderid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;

--
-- AUTO_INCREMENT for table `sales`
--
ALTER TABLE `sales`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
COMMIT;

