-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 21, 2025 at 03:15 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

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: `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);

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

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

CREATE TABLE `users` (
  `user_id` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `mobile` bigint(20) NOT NULL,
  `password` varchar(255) NOT NULL,
  `role_id` int(11) NOT NULL,
  `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 `users`
--

INSERT INTO `users` (`user_id`, `username`, `email`, `mobile`, `password`, `role_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'tejas', 'tpajave@gmail.com', 7021454973, '$2y$10$tEyxx42MXm8sM2RLi1BR2OShLIvQzMm1fcKxPDU1lJZn6TSJhRtCy', 1, '2024-12-03 12:27:51', '2024-12-03 13:08:08', NULL),
(2, 'vaishnavi', 'vaishnavi@gmail.com', 7021454976, '$2y$10$hiZXKlhDKyo3FayL6xKGS.U4ocmF5VR/tIBsd0kB85bH8sRXDhB0e', 2, '2024-12-03 12:31:10', '2025-04-21 15:55:55', NULL),
(3, 'dnyaneshwari', 'dnyaneshwari@gmail.com', 7021459678, '$2y$10$jpjStraKNM44Xx6VsvNOqu529B7SXOUSPR71/hiKiUFvG8nmC/gUG', 3, '2024-12-03 13:09:23', NULL, NULL);

--
-- 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`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`user_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;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- 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;

/*!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 */;
