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

START TRANSACTION;



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

--
-- Table structure for table `admin_logs`
--

CREATE TABLE IF NOT EXISTS `admin_logs` (
  `log_id` int(8) NOT NULL AUTO_INCREMENT,
  `admin_id` int(6) DEFAULT 0,
  `log_date` date DEFAULT NULL,
  `log_time` time DEFAULT NULL,
  `ip_address` varchar(255) DEFAULT NULL,
  `browser` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=295 DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `billing_details`
--

CREATE TABLE IF NOT EXISTS `billing_details` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `order_id` int(4) NOT NULL,
  `user_id` int(4) NOT NULL,
  `firstname` varchar(50) NOT NULL,
  `lastname` varchar(50) NOT NULL,
  `email` varchar(50) NOT NULL,
  `mobile` varchar(10) NOT NULL,
  `address` text NOT NULL,
  `created_ip` varchar(30) NOT NULL,
  `created_datetime` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `billing_details`
--

INSERT INTO `billing_details` (`id`, `order_id`, `user_id`, `firstname`, `lastname`, `email`, `mobile`, `address`, `created_ip`, `created_datetime`) VALUES
(8, 3, 7, 'Pradeep', 'kumar', 'pradeep@wtllp.co.in', '9555379578', 'Delhi sec-12', '::1', '2020-08-31 13:09:41'),
(6, 1, 5, 'Pradeep', 'kumar', 'pradeep@wtllp.co.in', '9555379578', 'Delhi sec-12', '::1', '2020-06-30 11:00:32'),
(7, 2, 5, 'Akash', 'kumar', 'akash@gmail.com', '9887655645', 'Delhi sec-121', '::1', '2020-06-30 11:03:38'),
(9, 4, 5, 'Akash', 'kumar', 'carpenter2@gmail.com', '9798784544', 'Delhi sec-121', '::1', '2020-08-31 13:17:34'),
(10, 5, 5, 'Pradeep', 'kumar', 'pradeep@wtllp.co.in', '9555379578', 'Delhi sec-12', '::1', '2020-09-02 12:20:41');

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

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

CREATE TABLE IF NOT EXISTS `category` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(150) NOT NULL,
  `belongsto` int(4) NOT NULL,
  `active` tinyint(1) NOT NULL,
  `image` varchar(100) NOT NULL,
  `sort_order` int(4) NOT NULL,
  `url_name` varchar(150) NOT NULL,
  `created_by` int(4) NOT NULL,
  `created_date` datetime NOT NULL,
  `created_ip` varchar(30) NOT NULL,
  `modified_by` int(4) NOT NULL DEFAULT 0,
  `modified_date` datetime NOT NULL,
  `modified_ip` int(4) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;

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

INSERT INTO `category` (`id`, `category_name`, `belongsto`, `active`, `image`, `sort_order`, `url_name`, `created_by`, `created_date`, `created_ip`, `modified_by`, `modified_date`, `modified_ip`) VALUES
(3, 'Fruits', 0, 1, 'category_image/1_about.jpg', 3, '', 1, '2020-06-03 00:00:00', '::1', 1, '2020-06-03 00:00:00', 0),
(4, 'Juicy fruits', 3, 1, 'category_image/4_img-1.jpg', 1, '', 1, '2020-06-03 00:00:00', '::1', 0, '0000-00-00 00:00:00', 0),
(5, 'Milk', 0, 1, 'category_image/5_custom-bg1.jpg', 2, '', 1, '2020-06-03 00:00:00', '::1', 1, '2020-06-05 00:00:00', 0),
(6, 'Full Cream Milk', 5, 1, '', 2, '', 1, '2020-06-03 00:00:00', '::1', 0, '0000-00-00 00:00:00', 0),
(7, 'Tond Milk', 5, 1, 'category_image/7_3-b.jpg', 3, '', 1, '2020-06-03 00:00:00', '::1', 1, '2020-06-08 00:00:00', 0),
(8, 'Normal Milk', 5, 1, '', 3, '', 1, '2020-06-04 00:00:00', '::1', 0, '0000-00-00 00:00:00', 0),
(9, 'Chocho Milk', 5, 1, '', 4, '', 1, '2020-06-04 00:00:00', '::1', 0, '0000-00-00 00:00:00', 0),
(13, 'abc', 4, 1, '', 1, '', 1, '2020-06-08 00:00:00', '::1', 0, '0000-00-00 00:00:00', 0);

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

--
-- Table structure for table `city`
--

CREATE TABLE IF NOT EXISTS `city` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `state_id` int(4) NOT NULL,
  `city` varchar(250) NOT NULL,
  `installation` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `city`
--

INSERT INTO `city` (`id`, `state_id`, `city`, `installation`) VALUES
(1, 3, 'Mayur vihar', 0),
(2, 2, 'khora', 0),
(3, 3, 'Anand vihar', 0),
(4, 3, 'Uttam nagar', 0),
(5, 3, 'Moti Bag', 0),
(6, 4, 'Sonipat', 1),
(7, 4, 'Rai', 0),
(8, 4, 'Panipat', 1),
(9, 4, 'Jind', 1),
(10, 6, 'Almora', 1),
(11, 6, 'Rudrapur', 1),
(12, 6, 'Bageshwar', 0);

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

--
-- Table structure for table `currency`
--

CREATE TABLE IF NOT EXISTS `currency` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `currency` varchar(50) NOT NULL,
  `symbol` varchar(50) NOT NULL,
  `active` tinyint(2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `currency`
--

INSERT INTO `currency` (`id`, `currency`, `symbol`, `active`) VALUES
(2, 'Rs', '<i class=\"fas fa-rupee-sign\"></i>', 1),
(3, 'Dollar', '<i class=\"fas fa-dollar-sign\"></i>', 0);

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

--
-- Table structure for table `forms`
--

CREATE TABLE IF NOT EXISTS `forms` (
  `form_id` int(6) NOT NULL AUTO_INCREMENT,
  `category_id` int(6) DEFAULT NULL,
  `form_name` varchar(100) DEFAULT NULL,
  `url` varchar(100) DEFAULT NULL,
  `serial_no` int(4) NOT NULL DEFAULT 0,
  `type` tinyint(1) NOT NULL,
  PRIMARY KEY (`form_id`)
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `forms`
--

INSERT INTO `forms` (`form_id`, `category_id`, `form_name`, `url`, `serial_no`, `type`) VALUES
(3, 1, 'Add', 'category/addcategory', 1, 1),
(4, 3, 'Unit', 'master/listunit', 1, 0),
(5, 3, 'Packing', 'master/listpacking', 2, 0),
(6, 1, 'List', 'category/listcategory', 2, 2),
(7, 2, 'Add', 'product/addproduct', 1, 1),
(8, 2, 'List', 'product/listproduct', 2, 2),
(40, 2, 'Edit', 'product/listproduct', 3, 3),
(41, 2, 'Delete', 'product/listproduct', 4, 4),
(43, 1, 'Edit', 'category/listcategory', 3, 3),
(44, 1, 'Delete', 'category/listcategory', 4, 4),
(52, 13, 'Authentication', 'Admin/selectuser', 1, 0),
(53, 14, 'Add', 'User/adduser', 1, 1),
(54, 14, 'List', 'User/listuser', 2, 2),
(55, 14, 'Edit', 'User/listuser', 3, 3),
(56, 14, 'Delete', 'User/listuser', 4, 4),
(57, 15, 'Pending', 'order/listorder', 1, 1),
(58, 15, 'Completed', 'order/listorder', 2, 2),
(59, 16, 'List', 'registration/listregistration', 1, 2);

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

--
-- Table structure for table `form_authentication`
--

CREATE TABLE IF NOT EXISTS `form_authentication` (
  `admin_id` int(6) DEFAULT 0,
  `form_id` int(6) DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `form_authentication`
--

INSERT INTO `form_authentication` (`admin_id`, `form_id`) VALUES
(5, 16),
(5, 9),
(5, 4);

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

--
-- Table structure for table `form_category`
--

CREATE TABLE IF NOT EXISTS `form_category` (
  `category_id` int(6) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(100) DEFAULT NULL,
  `serial_no` int(3) DEFAULT 0,
  `font_icon` varchar(20) NOT NULL,
  PRIMARY KEY (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `form_category`
--

INSERT INTO `form_category` (`category_id`, `category_name`, `serial_no`, `font_icon`) VALUES
(1, 'Category', 15, ''),
(2, 'Product', 20, ''),
(3, 'Master', 5, ''),
(13, 'Extra', 60, ''),
(14, 'User', 58, ''),
(15, 'Order', 40, ''),
(16, 'Registration', 30, 'fas fa-users');

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

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

CREATE TABLE IF NOT EXISTS `orders` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `user_id` int(4) NOT NULL DEFAULT 0,
  `total` double(8,2) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 0,
  `order_date` datetime NOT NULL DEFAULT current_timestamp(),
  `paymenttype_id` int(4) NOT NULL,
  `discount` double(8,2) NOT NULL,
  `paidamount` double(8,2) NOT NULL,
  `receive_date` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

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

INSERT INTO `orders` (`id`, `user_id`, `total`, `status`, `order_date`, `paymenttype_id`, `discount`, `paidamount`, `receive_date`) VALUES
(1, 5, 926.20, 2, '2020-06-28 11:03:38', 1, 200.00, 726.20, '2020-09-04 16:32:00'),
(2, 5, 212.50, 1, '2020-06-30 11:03:38', 0, 0.00, 0.00, '0000-00-00 00:00:00'),
(4, 5, 1388.70, 2, '2020-08-31 13:17:34', 3, 0.00, 1388.70, '2020-09-04 17:08:00'),
(5, 5, 752.50, 1, '2020-09-02 12:20:41', 0, 0.00, 0.00, '0000-00-00 00:00:00');

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

--
-- Table structure for table `orders_detail`
--

CREATE TABLE IF NOT EXISTS `orders_detail` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `user_id` int(4) NOT NULL,
  `orders_id` int(4) NOT NULL DEFAULT 0,
  `product_id` int(4) NOT NULL,
  `product_unit_id` int(4) NOT NULL,
  `product_qty` int(4) NOT NULL,
  `product_price` double(8,2) NOT NULL,
  `currsymbol` varchar(150) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 0,
  `service_date` date NOT NULL,
  `service_time` int(4) NOT NULL,
  `addon_or_not` tinyint(1) NOT NULL DEFAULT 0,
  `created_datetime` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `orders_detail`
--

INSERT INTO `orders_detail` (`id`, `user_id`, `orders_id`, `product_id`, `product_unit_id`, `product_qty`, `product_price`, `currsymbol`, `status`, `service_date`, `service_time`, `addon_or_not`, `created_datetime`) VALUES
(1, 5, 1, 4, 4, 1, 164.70, '', 1, '2020-06-30', 3, 0, '2020-06-30 10:57:44'),
(2, 5, 1, 1, 4, 1, 212.50, '', 1, '2020-06-30', 4, 0, '2020-06-30 10:58:13'),
(3, 5, 2, 1, 4, 1, 212.50, '', 1, '2020-06-30', 2, 0, '2020-06-30 11:02:57'),
(4, 5, 4, 4, 4, 1, 164.70, '', 1, '2020-06-30', 4, 0, '2020-06-30 12:51:21'),
(5, 21, 0, 1, 4, 1, 212.50, '', 0, '2020-08-11', 2, 0, '2020-08-21 14:28:42'),
(6, 21, 0, 2, 3, 1, 540.00, '', 0, '2020-08-22', 2, 0, '2020-08-21 14:30:12'),
(7, 7, 3, 1, 4, 1, 212.50, '', 1, '2020-08-31', 0, 0, '2020-08-31 13:08:21'),
(8, 5, 4, 2, 3, 1, 540.00, '', 1, '2020-08-31', 2, 0, '2020-08-31 13:17:07'),
(14, 5, 5, 2, 3, 1, 540.00, '', 1, '2020-09-02', 2, 0, '2020-09-02 12:07:18'),
(15, 5, 5, 1, 4, 1, 212.50, '', 1, '2020-09-02', 4, 0, '2020-09-02 12:12:30'),
(17, 5, 0, 1, 4, 1, 212.50, '', 0, '2020-09-02', 3, 0, '2020-09-02 13:46:19'),
(18, 5, 0, 2, 3, 1, 540.00, '', 0, '2020-09-02', 3, 0, '2020-09-02 15:11:19'),
(20, 5, 0, 4, 4, 1, 164.70, '<i class=\"fa fa-inr\"></i>', 0, '2020-09-07', 4, 0, '2020-09-07 13:11:24');

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

--
-- Table structure for table `packing`
--

CREATE TABLE IF NOT EXISTS `packing` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `packing` varchar(250) NOT NULL,
  `unit_id` int(4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `packing`
--

INSERT INTO `packing` (`id`, `packing`, `unit_id`) VALUES
(1, '200', 5),
(2, '1', 4),
(3, '2', 4),
(4, '3', 4);

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

--
-- Table structure for table `paymenttype`
--

CREATE TABLE IF NOT EXISTS `paymenttype` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `paymenttype` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `paymenttype`
--

INSERT INTO `paymenttype` (`id`, `paymenttype`) VALUES
(1, 'Cash'),
(3, 'Paytm');

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

--
-- Table structure for table `product`
--

CREATE TABLE IF NOT EXISTS `product` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `product_name` varchar(80) NOT NULL,
  `item_code` varchar(50) NOT NULL,
  `category_id` int(4) NOT NULL,
  `url_name` varchar(150) NOT NULL,
  `created_by` int(4) NOT NULL,
  `created_ip` varchar(30) NOT NULL,
  `created_date` datetime NOT NULL,
  `modified_by` int(4) NOT NULL DEFAULT 0,
  `modified_date` datetime NOT NULL,
  `modified_ip` varchar(30) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `product`
--

INSERT INTO `product` (`id`, `product_name`, `item_code`, `category_id`, `url_name`, `created_by`, `created_ip`, `created_date`, `modified_by`, `modified_date`, `modified_ip`) VALUES
(1, 'Abc testing', 'test-433', 5, '', 1, '::1', '2020-06-06 13:08:54', 1, '2020-08-27 11:29:07', '::1'),
(2, 'a', '1', 5, '', 1, '::1', '2020-09-05 16:08:17', 0, '0000-00-00 00:00:00', '0');

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

--
-- Table structure for table `product_category_child`
--

CREATE TABLE IF NOT EXISTS `product_category_child` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `product_id` int(4) NOT NULL,
  `sub_category_id` int(4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `product_category_child`
--

INSERT INTO `product_category_child` (`id`, `product_id`, `sub_category_id`) VALUES
(22, 1, 8),
(21, 1, 7),
(20, 1, 6),
(24, 8, 9),
(23, 8, 6),
(13, 7, 4),
(25, 9, 6),
(26, 9, 8),
(27, 9, 9),
(28, 10, 7),
(29, 10, 8),
(30, 11, 4),
(31, 12, 8);

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

--
-- Table structure for table `product_child`
--

CREATE TABLE IF NOT EXISTS `product_child` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `product_id` int(4) NOT NULL,
  `packing_id` int(4) NOT NULL,
  `rate` double(8,2) NOT NULL,
  `active` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `product_child`
--

INSERT INTO `product_child` (`id`, `product_id`, `packing_id`, `rate`, `active`) VALUES
(24, 1, 3, 210.00, 1),
(23, 1, 4, 300.00, 1),
(22, 1, 2, 120.00, 1),
(15, 7, 3, 20.00, 1),
(14, 7, 2, 10.00, 1),
(30, 12, 3, 50.00, 1);

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

--
-- Table structure for table `product_child_image`
--

CREATE TABLE IF NOT EXISTS `product_child_image` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `product_id` int(4) NOT NULL,
  `image` varchar(150) NOT NULL,
  `main_image_thumb` varchar(150) NOT NULL,
  `product_image_or_not` tinyint(2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `product_child_image`
--

INSERT INTO `product_child_image` (`id`, `product_id`, `image`, `main_image_thumb`, `product_image_or_not`) VALUES
(8, 12, 'product_image/12_service-car.jpg', '', 0),
(3, 12, 'product_image/12_service-carpet.jpg', '', 0),
(4, 12, 'product_image/12_service-sofa.jpg', '', 0),
(7, 12, 'product_image/12_img-sofa.jpg', 'product_image/thumb/12_img-sofa_thumb.jpg', 1),
(9, 12, 'product_image/12_1.jpg', 'product_image/thumb/12_1_thumb.jpg', 1),
(10, 12, 'product_image/12_2.jpg', '', 0),
(11, 12, 'product_image/12_3.jpg', '', 0);

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

--
-- Table structure for table `shipping_details`
--

CREATE TABLE IF NOT EXISTS `shipping_details` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `order_id` int(4) NOT NULL,
  `user_id` int(4) NOT NULL,
  `firstname` varchar(50) NOT NULL,
  `lastname` varchar(50) NOT NULL,
  `email` varchar(50) NOT NULL,
  `mobile` varchar(10) NOT NULL,
  `address` text NOT NULL,
  `created_ip` varchar(30) NOT NULL,
  `created_datetime` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `shipping_details`
--

INSERT INTO `shipping_details` (`id`, `order_id`, `user_id`, `firstname`, `lastname`, `email`, `mobile`, `address`, `created_ip`, `created_datetime`) VALUES
(6, 1, 5, 'Pradeep1', 'kumar', 'pradeep@wtllp.co.in', '9555379578', 'Delhi sec-12', '::1', '2020-06-30 11:00:32'),
(8, 3, 7, 'Pradeep', 'kumar', 'pradeep@wtllp.co.in', '9555379578', 'Delhi sec-12', '::1', '2020-08-31 13:09:41'),
(7, 2, 5, 'Akash2', 'kumar', 'akash@gmail.com', '9887655645', 'Delhi sec-121', '::1', '2020-06-30 11:03:38'),
(9, 4, 5, 'Akash', 'kumar', 'carpenter2@gmail.com', '9798784544', 'Delhi sec-121', '::1', '2020-08-31 13:17:34'),
(10, 5, 5, 'Pradeep', 'kumar', 'pradeep@wtllp.co.in', '9555379578', 'Delhi sec-12', '::1', '2020-09-02 12:20:41');

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

--
-- Table structure for table `state`
--

CREATE TABLE IF NOT EXISTS `state` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `state` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `state`
--

INSERT INTO `state` (`id`, `state`) VALUES
(2, 'Noida'),
(3, 'Delhi'),
(4, 'Haryana'),
(5, 'Punjab'),
(6, 'Uttakhand'),
(7, 'Goa');

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

--
-- Table structure for table `unit`
--

CREATE TABLE IF NOT EXISTS `unit` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `unit` varchar(250) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `unit`
--

INSERT INTO `unit` (`id`, `unit`) VALUES
(4, 'kg'),
(3, 'gm'),
(5, 'Litter');
COMMIT;

