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

START TRANSACTION;



--
-- Database: `loveberi`
--

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

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

CREATE TABLE `categories` (
  `category_id` int(255) NOT NULL,
  `category_name` varchar(255) NOT NULL,
  `category_img` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `categories` (`category_id`, `category_name`, `category_img`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Exotic Fruit', 'category/category_68036602baadb3.51950551.jpg', '2025-04-19 08:59:46', NULL, NULL),
(2, 'Tropical Fruit', 'category/category_6803660c9b1d28.10291612.jpg', '2025-04-19 08:59:56', NULL, NULL),
(3, 'Tropical Fruit Prep', 'category/category_68036615d746e6.46295769.jpg', '2025-04-19 09:00:05', NULL, NULL),
(4, 'Exotic Fruit Prep', 'category/category_68036627b70865.46510427.jpg', '2025-04-19 09:00:23', NULL, NULL);

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

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `permission_id` int(11) NOT NULL,
  `permission_name` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`permission_id`, `permission_name`) VALUES
(1, 'View Roles and Permissions'),
(2, 'Manage Users'),
(3, 'Access Dashboard'),
(4, 'Category'),
(5, 'Products');

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

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

CREATE TABLE `products` (
  `product_id` int(255) NOT NULL,
  `product_name` varchar(255) NOT NULL,
  `product_url_name` varchar(255) NOT NULL,
  `sku_id` int(255) NOT NULL,
  `hsn_code` int(255) NOT NULL,
  `category_id` int(255) NOT NULL,
  `product_description` longtext NOT NULL,
  `product_specification` longtext NOT NULL,
  `product_status` int(255) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `products` (`product_id`, `product_name`, `product_url_name`, `sku_id`, `hsn_code`, `category_id`, `product_description`, `product_specification`, `product_status`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Frozen Raspberry', 'frozen-raspberry', 1001, 1745064670, 1, '<p>Loveberi Raspberry made with real ingredients, this is the only Raspberry you will ever need. This is a premium quality and 100% natural product. It&#39;s a pre-washed, frozen fresh raspberry with no added sugar. All natural antioxidants, vitamins and minerals contained in this exclusive blend make it perfect to eat or drink as dessert or even as a healthy breakfast. It offers a healthy way of eating to reduce the risk of diabetes and maintain an overall good health. Plus, this is ready to eat so you can start enjoying a sweet treat straight away.</p>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>Other Product Info</p>\r\n\r\n<p>&nbsp;</p>\r\n\r\n<p>EAN Code: 8939115071082<br />\r\nFSSAI: 12823019000203<br />\r\nManufactured &amp; Marketed by: MASTER FRUITS D.O.O., Velikoremetska 6, (Vojislava Iveti?a bb), 11211 Bor?a, Belgrade, Sebia. &amp; Ethnic Food Prodcuts Solution Ltd, 505, Commodity Exchange, Sector &ndash; 19, Vashi. Navi Mumbai &ndash; 400705.<br />\r\nImported by: Velikoremetska 6, (Vojislava Iveti?a bb), 11211 Bor?a, Belgrade, Sebia.<br />\r\nCountry of origin: Serbia<br />\r\nBest before 24-09-2024<br />\r\nFor Queries/Feedback/Complaints, Contact our Customer Care Executive at: Phone: 1860 123 1000 | Address: Innovative Retail Concepts Private Limited, Ranka Junction 4th Floor, Tin Factory bus stop. KR Puram, Bangalore - 560016&nbsp;</p>\r\n', '<p>Nutritional Facts</p>\r\n\r\n<p>Per 100 g</p>\r\n\r\n<ul>\r\n	<li>Energy - 43 Kcal</li>\r\n	<li>Total Fat - 0.3 g</li>\r\n	<li>Saturated Fat - 0 g</li>\r\n	<li>Carbohydrates - 6.6 g</li>\r\n	<li>Sugar - 4.5 g</li>\r\n	<li>Fibre - 4.9 g</li>\r\n	<li>Protein - 1.1 g</li>\r\n	<li>Salt - 0 g</li>\r\n</ul>\r\n', 1, '2025-04-19 17:43:13', NULL, NULL);

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

--
-- Table structure for table `product_imgs`
--

CREATE TABLE `product_imgs` (
  `img_id` int(255) NOT NULL,
  `product_id` int(11) NOT NULL,
  `product_img` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `product_imgs`
--

INSERT INTO `product_imgs` (`img_id`, `product_id`, `product_img`, `created_at`, `deleted_at`) VALUES
(1, 1, 'product_img/6803935990000_loveberi-raspberry.png', '2025-04-19 12:13:13', NULL),
(2, 1, 'product_img/6803935992c60_569024191_loveberi-raspberry-2.jpg', '2025-04-19 12:13:13', NULL);

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

--
-- Table structure for table `product_units`
--

CREATE TABLE `product_units` (
  `unit_id` int(255) NOT NULL,
  `product_id` int(11) NOT NULL,
  `unit_name` varchar(255) NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `product_units`
--

INSERT INTO `product_units` (`unit_id`, `product_id`, `unit_name`, `unit_price`, `created_at`, `deleted_at`) VALUES
(1, 1, '1000g', 1699.00, '2025-04-19 12:13:13', NULL),
(2, 1, '250g', 449.00, '2025-04-19 12:13:13', NULL);

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

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `role_id` int(11) NOT NULL,
  `role_name` varchar(255) NOT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`role_id`, `role_name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'super admin', '2024-12-02 16:14:29', NULL, NULL),
(2, 'admin', '2024-12-02 16:14:40', '2025-03-20 09:02:12', NULL),
(3, 'customer', '2024-12-02 16:39:22', NULL, NULL),
(5, 'sdas', '2025-04-21 15:33:40', '2025-04-21 15:35:39', '2025-04-21 15:35:39'),
(6, 'sdas', '2025-04-21 15:34:18', '2025-04-21 15:35:44', '2025-04-21 15:35:44'),
(7, 'sdas', '2025-04-21 15:46:19', '2025-04-21 15:46:25', '2025-04-21 15:46:25');

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

--
-- Table structure for table `role_permissions`
--

CREATE TABLE `role_permissions` (
  `role_permissions_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `role_permissions`
--

INSERT INTO `role_permissions` (`role_permissions_id`, `role_id`, `permission_id`) VALUES
(172, 2, 3),
(188, 1, 1),
(189, 1, 2),
(190, 1, 3),
(191, 1, 4),
(192, 1, 5);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`category_id`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`permission_id`);

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

--
-- Indexes for table `product_imgs`
--
ALTER TABLE `product_imgs`
  ADD PRIMARY KEY (`img_id`);

--
-- Indexes for table `product_units`
--
ALTER TABLE `product_units`
  ADD PRIMARY KEY (`unit_id`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`role_id`);

--
-- Indexes for table `role_permissions`
--
ALTER TABLE `role_permissions`
  ADD PRIMARY KEY (`role_permissions_id`),
  ADD KEY `role_id` (`role_id`),
  ADD KEY `permission_id` (`permission_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `category_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `permission_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `product_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `product_imgs`
--
ALTER TABLE `product_imgs`
  MODIFY `img_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `product_units`
--
ALTER TABLE `product_units`
  MODIFY `unit_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `role_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `role_permissions`
--
ALTER TABLE `role_permissions`
  MODIFY `role_permissions_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=193;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `role_permissions`
--
ALTER TABLE `role_permissions`
  ADD CONSTRAINT `role_permissions_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`role_id`),
  ADD CONSTRAINT `role_permissions_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`permission_id`);
COMMIT;

