-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 27, 2026 at 02:35 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: `gp_crackers`
--

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

--
-- Table structure for table `cart_items`
--

CREATE TABLE `cart_items` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `session_id` varchar(255) DEFAULT NULL,
  `product_id` varchar(100) NOT NULL,
  `product_name` varchar(100) NOT NULL,
  `product_price` decimal(10,2) NOT NULL,
  `product_image` varchar(255) DEFAULT NULL,
  `quantity` int(11) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `cart_items`
--

INSERT INTO `cart_items` (`id`, `user_id`, `session_id`, `product_id`, `product_name`, `product_price`, `product_image`, `quantity`, `created_at`, `updated_at`) VALUES
(1, 1, 'mbr1chl9lvshq16b5l3v2n4chj', '2', '7cm Color Sparklers', 80.00, './assets/images/products/7-cm-color-sparklers.png', 1, '2026-03-27 12:39:23', '2026-03-27 12:39:23'),
(2, 1, 'mbr1chl9lvshq16b5l3v2n4chj', '3', 'Lunik Express', 250.00, './assets/images/products/lunik-rocket-express.jpg', 4, '2026-03-27 12:39:24', '2026-03-27 13:07:26'),
(3, 1, 'mbr1chl9lvshq16b5l3v2n4chj', '1', 'Color Koti', 150.00, './assets/images/products/product_1.jpg', 3, '2026-03-27 12:39:33', '2026-03-27 13:07:15'),
(4, 1, 'mbr1chl9lvshq16b5l3v2n4chj', '8', 'Super Man', 300.00, './assets/images/products/Super-Man-scaled.jpg', 1, '2026-03-27 12:40:26', '2026-03-27 12:40:26'),
(5, 3, '310mc9524ku88oppd9s5i914s9', '1', 'Color Koti', 150.00, './assets/images/products/product_1.jpg', 4, '2026-03-27 12:42:53', '2026-03-27 12:58:43'),
(6, 1, 'mbr1chl9lvshq16b5l3v2n4chj', '4', 'Big Chakkar', 100.00, './assets/images/products/Ground-Chakara-Big-1-scaled.jpg', 1, '2026-03-27 13:07:54', '2026-03-27 13:07:54'),
(7, 4, 'frdc8oj2lo52is1k34ll56k2h9', '3', 'Lunik Express', 250.00, './assets/images/products/lunik-rocket-express.jpg', 1, '2026-03-27 13:09:29', '2026-03-27 13:09:29'),
(8, 4, 'frdc8oj2lo52is1k34ll56k2h9', '4', 'Big Chakkar', 100.00, './assets/images/products/Ground-Chakara-Big-1-scaled.jpg', 1, '2026-03-27 13:09:30', '2026-03-27 13:09:30');

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

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

CREATE TABLE `products` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `category` varchar(50) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `image_url` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `products` (`id`, `name`, `category`, `price`, `image_url`, `description`, `created_at`) VALUES
(1, 'Color Koti', 'flowerpots', 150.00, './assets/images/products/product_1.jpg', NULL, '2026-03-27 07:17:47'),
(2, '7cm Color Sparklers', 'sparklers', 80.00, './assets/images/products/7-cm-color-sparklers.png', NULL, '2026-03-27 07:17:47'),
(3, 'Lunik Express', 'rockets', 250.00, './assets/images/products/lunik-rocket-express.jpg', NULL, '2026-03-27 07:17:47'),
(4, 'Big Chakkar', 'ground', 100.00, './assets/images/products/Ground-Chakara-Big-1-scaled.jpg', NULL, '2026-03-27 07:17:47'),
(5, 'Chit Put', 'bombs', 50.00, './assets/images/products/Chit-Put-min-scaled.jpg', NULL, '2026-03-27 07:17:47'),
(6, 'Atom Bomb', 'bombs', 120.00, './assets/images/products/crackers1.jpg', NULL, '2026-03-27 07:17:47'),
(7, 'Iron Man', 'fancy', 300.00, './assets/images/products/Iron-Man-scaled.jpg', NULL, '2026-03-27 07:17:47'),
(8, 'Super Man', 'fancy', 300.00, './assets/images/products/Super-Man-scaled.jpg', NULL, '2026-03-27 07:17:47');

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

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

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `full_name` varchar(100) NOT NULL,
  `phone_number` varchar(15) NOT NULL,
  `email` varchar(100) NOT NULL,
  `password` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `users` (`id`, `full_name`, `phone_number`, `email`, `password`, `created_at`, `updated_at`) VALUES
(1, 'SANTHOSH KUMAR T', '7812817420', 'santhoshkumardkv18@gmail.com', '$2y$10$FxMpASaEIQTNYqOCMnIegOISfC06r66hMmxyve/bVAVyvY.V/NkVa', '2026-03-27 04:28:46', '2026-03-27 04:28:46'),
(2, 'Test User', '1234567890', 'test@example.com', '$2y$10$Af4l0LjIoE4EEMDaA49dduB.yjQEf5CTU/nDR1t6kvi.ftQOul.LS', '2026-03-27 12:25:33', '2026-03-27 12:25:33'),
(3, 'Unique User 123', '1122334455', 'unique123@gmail.com', '$2y$10$zIWQ1W2TdalkcF5VaD00zOlBO02r9uK7HxY5xO1lhz3hj1NONrdT2', '2026-03-27 12:36:02', '2026-03-27 12:36:02'),
(4, 'SANTHOSH KUMAR T 22BSR049', '7812817422', 'santhoshkumart.22bsr@kongu.edu', '$2y$10$B5u31noO/72jzrjXaJvW4eoi/F6QNkcUYZs4KvTanRZ6igbxiFumm', '2026-03-27 13:09:01', '2026-03-27 13:09:01');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `cart_items`
--
ALTER TABLE `cart_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

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

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `phone_number` (`phone_number`),
  ADD UNIQUE KEY `email` (`email`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `cart_items`
--
ALTER TABLE `cart_items`
  ADD CONSTRAINT `cart_items_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
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 */;
