-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 09, 2025 at 04:04 AM
-- 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: `u25s2212_brewhub`
--

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

--
-- 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 DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `contact_submissions`
--

CREATE TABLE `contact_submissions` (
  `id` int(11) NOT NULL,
  `first_name` varchar(50) NOT NULL,
  `last_name` varchar(50) NOT NULL,
  `email` varchar(100) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `message` text NOT NULL,
  `created` datetime DEFAULT current_timestamp(),
  `status` varchar(20) NOT NULL DEFAULT 'New',
  `note` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `contact_submissions`
--

INSERT INTO `contact_submissions` (`id`, `first_name`, `last_name`, `email`, `phone`, `message`, `created`, `status`, `note`) VALUES
(1, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', 'test123', '2025-08-20 12:18:01', 'New', NULL),
(2, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', 'test123', '2025-08-20 12:19:20', 'New', NULL),
(3, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', 'test123', '2025-08-20 12:25:51', 'New', NULL),
(4, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', 'test123', '2025-08-20 12:25:51', 'New', NULL),
(5, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', '233333', '2025-08-20 12:27:56', 'New', NULL),
(6, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', '233333', '2025-08-20 12:27:56', 'New', NULL),
(9, 'AAA', 'BBB', '1234@gmail.com', '12341324', '231f2434rc4rd4', '2025-08-20 13:00:10', 'In Progress', NULL),
(10, 'aaa', 'aaa', 'aaa@gmail.com', '123', '123', '2025-08-21 05:18:24', 'Archived', 'tes'),
(11, 'aaaa', 'aaa', 'aaa@gmail.com', '1234', '12334', '2025-08-21 05:45:57', 'New', 'hel'),
(12, 'captcha', 'test', 'test@test.com', '', 'captcha test 24.08', '2025-08-24 12:19:03', 'New', NULL),
(13, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', 'Test', '2025-08-25 06:18:30', 'In Progress', NULL),
(14, 'Test', 'T', 'Test@sss.com', '12431413', 'US4: As James, I want to manage customer inquiries in an online inbox with clear statuses so that I can respond quickly and keep track of progress US4: As James, I want to manage customer inquiries in an online inbox with clear statuses so that I can respond quickly and keep track of progress US4: As James, I want to manage customer inquiries in an online inbox with clear statuses so that I can respond quickly and keep track of progress', '2025-09-08 00:09:20', 'Resolved', NULL),
(16, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', 'Hello', '2025-09-11 17:46:28', 'In Progress', 'Hello'),
(17, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', 'aaa', '2025-09-13 11:16:30', 'Resolved', NULL),
(18, 'Aaron', 'Test', 'test@email.com', '', 'TESTING DB FOR CPANEL', '2025-09-13 11:19:21', 'Resolved', NULL),
(20, 'Test', 'Test', 'test@test.com', '04000000000000000', 'Test', '2025-09-13 11:51:05', 'New', NULL),
(21, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440123421', 'a', '2025-09-13 11:53:06', 'New', NULL),
(22, 'Kavindi', 'K', 'kavindisk2003@gmail.com', '4300193941034', 'test', '2025-09-13 11:56:43', 'New', NULL),
(23, 'dsds', '111', 'dqxe@qr.com', '1234241242', 'adsda', '2025-09-13 11:58:36', 'New', NULL),
(25, 'sql', 'test', 'user@example.com', '', 'user@example.com\' OR \'1\'=\'1', '2025-09-13 22:02:11', 'New', NULL),
(26, 'injection', 'test', 'aaron.injection@test.com', '', 'user@example.com\' OR \'1\'=\'1', '2025-09-13 22:18:05', 'New', NULL),
(27, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', 'jeiwqdjuiwcfifqcuewfq', '2025-09-14 13:17:49', 'New', NULL),
(28, 'hello', 'test', 'qwr@qwre.com', '13432432', 'testsdddddddddddddddddddddddddddddddddddddddtestsdddddddddddddddddddddddddddddddddddddddtestsdddddddddddddddddddddddddddddddddddddddtestsdddddddddddddddddddddddddddddddddddddddtestsdddddddddddddddddddddddddddddddddddddddtestsddddddddddddddddddddddddddddddddddddddd', '2025-09-14 15:46:43', 'New', NULL),
(29, 'dsdsds', 'dsdsds', 'qwdqwd@qw.com', '1241412214', 'test', '2025-09-14 15:47:24', 'New', NULL),
(31, 'f', 'f', 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnjjjjjj@gmail.com', '', 'ddd', '2025-09-18 17:14:46', 'New', 'no'),
(32, 'Chuqing', 'gggg', 'test@gmail.com', '1590705069', 'hgdhhgchghgcghchgchgcghchcghfhvjhvjhvhjvjhvghchcjhvjhvhgcghvjhbmjnkjnsfknsklfnweklfjwkeljflewknfoewifnwelijflwejfwleknfewijflkdjfwdmflwmlwdjflwjflnwldfjwkhfkwehflkewjflwemnf.kwknlkfmndwk,kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk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kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk', '2025-09-18 17:18:49', 'New', ''),
(34, 'Ash', 'W', 'test@test.com', '', ' ', '2025-09-18 17:45:26', 'New', NULL),
(35, 'Ash', 'W', 'test@test.com', '', '\"<script>alert(\"oh no!\")</script>', '2025-09-18 17:46:13', 'New', NULL),
(36, 'Gokul', 'Nair', 'gokulknair2003@gmail.com', '0499266663', '             ', '2025-09-18 17:46:57', 'New', NULL),
(37, 'Gokul', 'Nair', 'admin@example.com', '0499266663', '     ', '2025-09-18 17:48:53', 'New', NULL),
(38, 'Zixuan', 'Wang', 'zwan0487@student.monash.edu', '0458689440', 'test email', '2025-09-25 15:25:27', 'New', NULL);

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

--
-- Table structure for table `landing_pages`
--

CREATE TABLE `landing_pages` (
  `id` int(11) NOT NULL,
  `hero_title` varchar(255) NOT NULL,
  `hero_subtitle` varchar(255) NOT NULL,
  `promo_copy` text DEFAULT NULL,
  `featured_products` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`featured_products`))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `landing_pages`
--

INSERT INTO `landing_pages` (`id`, `hero_title`, `hero_subtitle`, `promo_copy`, `featured_products`) VALUES
(1, 'Premium Coffee, Roasted with Expertise', 'Coffee innovators committed to excellence, using cutting-edge technology to lead the industry.', 'Enjoy a complimentary coffee tasting\r\nsession with every purchase! ', '[15,16,18,17]');

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

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

CREATE TABLE `orders` (
  `id` int(11) NOT NULL,
  `order_no` varchar(32) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `customer_name` varchar(100) DEFAULT NULL,
  `email` varchar(160) DEFAULT NULL,
  `phone` varchar(40) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `status` enum('waiting','approved','processing','completed','canceled') NOT NULL DEFAULT 'waiting',
  `subtotal` decimal(10,2) NOT NULL DEFAULT 0.00,
  `total` decimal(10,2) NOT NULL DEFAULT 0.00,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `orders` (`id`, `order_no`, `user_id`, `customer_name`, `email`, `phone`, `notes`, `status`, `subtotal`, `total`, `created`, `modified`) VALUES
(2, 'BH-20250918-724B', NULL, NULL, NULL, NULL, NULL, 'approved', 89.98, 89.98, '2025-09-18 06:08:53', '2025-09-18 15:58:07'),
(4, 'BH-20250918-2732', NULL, NULL, NULL, NULL, NULL, 'waiting', 71.98, 71.98, '2025-09-18 06:17:17', '2025-09-18 06:17:17'),
(6, 'BH-20250918-1AB6', NULL, NULL, NULL, NULL, NULL, 'approved', 87.98, 87.98, '2025-09-18 06:46:38', '2025-09-18 07:48:52'),
(7, 'BH-20250918-B86F', NULL, NULL, NULL, NULL, NULL, 'canceled', 47.98, 47.98, '2025-09-18 06:47:07', '2025-10-04 13:10:47'),
(8, 'BH-20250918-C9B6', NULL, NULL, NULL, NULL, NULL, 'canceled', 71.98, 71.98, '2025-09-18 06:49:24', '2025-09-18 07:49:10'),
(9, 'BH-20250918-03E4', NULL, NULL, NULL, NULL, NULL, 'completed', 56.99, 56.99, '2025-09-18 08:33:09', '2025-10-04 13:09:06'),
(11, 'BH-20250918-98D6', NULL, NULL, NULL, NULL, NULL, 'canceled', 41.98, 41.98, '2025-09-18 13:03:51', '2025-09-18 13:57:47'),
(12, 'BH-20250918-F8DD', NULL, NULL, NULL, NULL, NULL, 'waiting', 62.97, 62.97, '2025-09-18 14:57:43', '2025-09-18 14:57:43'),
(13, 'BH-20250918-4799', NULL, NULL, NULL, NULL, NULL, 'waiting', 62.97, 62.97, '2025-09-18 15:13:11', '2025-10-04 13:05:00'),
(14, 'BH-20250918-26F4', NULL, NULL, NULL, NULL, NULL, 'processing', 20.99, 20.99, '2025-09-18 15:21:46', '2025-09-18 15:57:51'),
(15, 'BH-20250918-8B70', NULL, NULL, NULL, NULL, NULL, 'waiting', 20.99, 20.99, '2025-09-18 15:21:51', '2025-09-18 15:21:51'),
(16, 'BH-20250918-11CC', NULL, NULL, NULL, NULL, NULL, 'waiting', 65.98, 65.98, '2025-09-18 15:23:12', '2025-09-18 15:23:12'),
(17, 'BH-20250918-1127', NULL, NULL, NULL, NULL, NULL, 'canceled', 59.00, 59.00, '2025-09-18 15:23:44', '2025-10-06 16:11:53'),
(18, 'BH-20250918-A832', NULL, NULL, NULL, NULL, NULL, 'waiting', 62.97, 62.97, '2025-09-18 15:42:36', '2025-09-18 15:42:36'),
(19, 'BH-20250918-8B16', NULL, NULL, NULL, NULL, NULL, 'completed', 20.99, 20.99, '2025-09-18 15:57:12', '2025-09-18 15:58:14'),
(20, 'BH-20250918-48DB', NULL, NULL, NULL, NULL, NULL, 'waiting', 125.94, 125.94, '2025-09-18 16:00:39', '2025-10-09 10:44:45'),
(21, 'BH-20250918-64C7', NULL, NULL, NULL, NULL, NULL, 'waiting', 41.98, 41.98, '2025-09-18 16:58:34', '2025-09-18 16:58:34'),
(22, 'BH-20250918-9DC4', NULL, NULL, NULL, NULL, NULL, 'waiting', 29.98, 29.98, '2025-09-18 17:18:27', '2025-09-18 17:18:27'),
(23, 'BH-20250918-8939', NULL, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-09-18 17:39:18', '2025-09-18 17:39:18'),
(24, 'BH-20250918-A484', NULL, NULL, NULL, NULL, NULL, 'waiting', 20.99, 20.99, '2025-09-18 17:39:55', '2025-09-18 17:39:55'),
(25, 'BH-20250918-0AB4', NULL, NULL, NULL, NULL, NULL, 'completed', 7192.70, 7192.70, '2025-09-18 17:40:39', '2025-10-06 16:07:01'),
(26, 'BH-20250918-F27B', NULL, NULL, NULL, NULL, NULL, 'waiting', 62.97, 62.97, '2025-09-18 17:40:50', '2025-09-18 17:40:50'),
(27, 'BH-20250920-E393', NULL, NULL, NULL, NULL, NULL, 'waiting', 41.98, 41.98, '2025-09-20 02:49:39', '2025-09-20 02:49:39'),
(29, 'BH-20251001-4F39', NULL, NULL, NULL, NULL, NULL, 'waiting', 130.96, 130.96, '2025-10-01 10:32:56', '2025-10-01 10:32:56'),
(30, 'BH-20251001-FAEC', NULL, NULL, NULL, NULL, NULL, 'approved', 31.99, 31.99, '2025-10-01 10:37:33', '2025-10-01 11:13:18'),
(31, 'BH-20251001-6F22', NULL, NULL, NULL, NULL, NULL, 'waiting', 163.95, 163.95, '2025-10-01 11:09:32', '2025-10-01 11:09:32'),
(32, 'BH-20251007-C8F6', NULL, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-07 22:53:03', '2025-10-07 22:53:03'),
(51, 'BH-20251007-0633', NULL, NULL, NULL, NULL, NULL, 'waiting', 31.99, 31.99, '2025-10-07 23:12:59', '2025-10-07 23:12:59'),
(58, 'BH-20251007-9540', NULL, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-07 23:27:16', '2025-10-07 23:27:16'),
(63, 'BH-20251008-3A7C', NULL, NULL, NULL, NULL, NULL, 'waiting', 65.98, 65.98, '2025-10-08 21:36:27', '2025-10-08 21:36:27'),
(64, 'BH-20251008-1A47', NULL, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-08 21:39:31', '2025-10-08 21:39:31'),
(65, 'BH-20251008-4C96', 1, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-08 21:40:32', '2025-10-08 21:40:32'),
(66, 'BH-20251008-EC36', 1, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-08 21:42:17', '2025-10-08 21:42:17'),
(67, 'BH-20251008-A2C7', 1, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-08 21:44:41', '2025-10-08 21:44:41'),
(68, 'BH-20251008-8239', 1, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-08 21:47:57', '2025-10-08 21:47:57'),
(70, 'BH-20251009-7A26', 1, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-09 11:41:30', '2025-10-09 11:41:30'),
(71, 'BH-20251009-83EB', 1, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-09 11:41:41', '2025-10-09 11:41:41'),
(72, 'BH-20251009-D822', 1, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-09 11:44:52', '2025-10-09 11:44:52'),
(73, 'BH-20251009-180A', 1, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-09 11:46:22', '2025-10-09 11:46:22'),
(74, 'BH-20251009-A168', 1, NULL, NULL, NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-09 11:47:39', '2025-10-09 11:47:39'),
(75, 'BH-20251009-6603', 1, NULL, NULL, NULL, NULL, 'waiting', 31.99, 31.99, '2025-10-09 12:09:44', '2025-10-09 12:09:44'),
(76, 'BH-20251009-E3CB', 1, NULL, 'test@example.com', NULL, NULL, 'waiting', 29.50, 29.50, '2025-10-09 12:10:28', '2025-10-09 12:10:28'),
(77, 'BH-20251009-5663', 1, NULL, 'test@example.com', NULL, NULL, 'waiting', 32.99, 32.99, '2025-10-09 12:13:52', '2025-10-09 12:13:52');

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

--
-- Table structure for table `order_items`
--

CREATE TABLE `order_items` (
  `id` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `product_id` int(11) DEFAULT NULL,
  `name` varchar(120) NOT NULL,
  `unit_price` decimal(10,2) NOT NULL,
  `qty` int(11) NOT NULL DEFAULT 1,
  `line_total` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `order_items`
--

INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `name`, `unit_price`, `qty`, `line_total`) VALUES
(1, 2, 18, 'Kenyan AA Coffee Beans', 56.99, 1, 56.99),
(2, 2, 17, 'Guatemalan Antigua Coffee Beans', 32.99, 1, 32.99),
(3, 4, 18, 'Kenyan AA Coffee Beans', 56.99, 1, 56.99),
(4, 4, 16, 'Colombian Supremo Coffee Beans', 14.99, 1, 14.99),
(5, 6, 18, 'Kenyan AA Coffee Beans', 56.99, 1, 56.99),
(6, 6, 1, 'Ethiopian Yirgacheffe Coffee Beans', 30.99, 1, 30.99),
(7, 7, 17, 'Guatemalan Antigua Coffee Beans', 32.99, 1, 32.99),
(8, 7, 16, 'Colombian Supremo Coffee Beans', 14.99, 1, 14.99),
(9, 8, 16, 'Colombian Supremo Coffee Beans', 14.99, 1, 14.99),
(10, 8, 18, 'Kenyan AA Coffee Beans', 56.99, 1, 56.99),
(11, 9, 18, 'Kenyan AA Coffee Beans', 56.99, 1, 56.99),
(12, 11, 36, 'Feels Good Organic Espresso Blend', 20.99, 2, 41.98),
(13, 12, 36, 'Feels Good Organic Espresso Blend', 20.99, 3, 62.97),
(14, 13, 36, 'Feels Good Organic Espresso Blend', 20.99, 3, 62.97),
(15, 14, 36, 'Feels Good Organic Espresso Blend', 20.99, 1, 20.99),
(16, 15, 36, 'Feels Good Organic Espresso Blend', 20.99, 1, 20.99),
(17, 16, 35, 'Good Vibrations Espresso Blend', 32.99, 2, 65.98),
(18, 17, 33, 'Wide Awake Strong Espresso Blend', 29.50, 2, 59.00),
(19, 18, 36, 'Feels Good Organic Espresso Blend', 20.99, 3, 62.97),
(20, 19, 36, 'Feels Good Organic Espresso Blend', 20.99, 1, 20.99),
(21, 20, 36, 'Feels Good Organic Espresso Blend', 20.99, 6, 125.94),
(22, 21, 36, 'Feels Good Organic Espresso Blend', 20.99, 2, 41.98),
(23, 22, 16, 'Colombian Supremo Coffee Beans', 14.99, 2, 29.98),
(24, 23, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(25, 24, 36, 'Feels Good Organic Espresso Blend', 20.99, 1, 20.99),
(26, 25, 36, 'Feels Good Organic Espresso Blend', 20.99, 6, 125.94),
(27, 25, 18, 'Kenyan AA Coffee Beans', 56.99, 124, 7066.76),
(28, 26, 36, 'Feels Good Organic Espresso Blend', 20.99, 3, 62.97),
(29, 27, 36, 'Feels Good Organic Espresso Blend', 20.99, 2, 41.98),
(32, 29, 35, 'Good Vibrations Espresso Blend', 32.99, 3, 98.97),
(33, 29, 34, 'Orthodox House Espresso Blend', 31.99, 1, 31.99),
(34, 30, 34, 'Orthodox House Espresso Blend', 31.99, 1, 31.99),
(35, 31, 36, 'Feels Good Organic Espresso Blend', 20.99, 3, 62.97),
(36, 31, 18, 'Kenyan AA Coffee Beans', 56.99, 1, 56.99),
(37, 31, 32, 'Italian Espresso Blend', 43.99, 1, 43.99),
(38, 32, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(57, 51, 34, 'Orthodox House Espresso Blend', 31.99, 1, 31.99),
(64, 58, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(69, 63, 35, 'Good Vibrations Espresso Blend', 32.99, 2, 65.98),
(70, 64, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(71, 65, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(72, 66, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(73, 67, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(74, 68, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(76, 70, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(77, 71, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(78, 72, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(79, 73, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(80, 74, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99),
(81, 75, 34, 'Orthodox House Espresso Blend', 31.99, 1, 31.99),
(82, 76, 33, 'Wide Awake Strong Espresso Blend', 29.50, 1, 29.50),
(83, 77, 35, 'Good Vibrations Espresso Blend', 32.99, 1, 32.99);

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

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

CREATE TABLE `products` (
  `id` int(11) NOT NULL,
  `name` varchar(150) NOT NULL,
  `description` text DEFAULT NULL,
  `price` decimal(10,2) NOT NULL,
  `sku` varchar(50) DEFAULT NULL,
  `stock` int(11) DEFAULT 0,
  `created` datetime DEFAULT current_timestamp(),
  `modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `image_url` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`image_url`)),
  `threshold` int(11) DEFAULT 5,
  `sale_price` decimal(10,2) DEFAULT NULL,
  `category` varchar(60) DEFAULT NULL,
  `options` text DEFAULT NULL,
  `archived` varchar(10) NOT NULL DEFAULT 'No'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `products` (`id`, `name`, `description`, `price`, `sku`, `stock`, `created`, `modified`, `image_url`, `threshold`, `sale_price`, `category`, `options`, `archived`) VALUES
(15, 'Brazilian Santos Coffee Beans', 'Premium Arabica beans from Santos, Brazil, offering a smooth taste with chocolate and nutty notes. Ideal for pour-over and drip coffee.', 22.99, 'COF-BR-001', 223, '2025-09-09 13:07:14', '2025-09-11 12:21:01', '[\"\\/team212-app_fit3047\\/img\\/products\\/1757557261_68c2320de3b44_0.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557261_68c2320de3e2c_1.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557261_68c2320de40c7_2.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557261_68c2320de432f_3.png\"]', 10, 19.99, 'Blends', NULL, 'No'),
(16, 'Colombian Supremo Coffee Beans', 'Rich and well-balanced Colombian beans with caramel and chocolate undertones. Great for espresso and French press.', 14.99, 'COF-CO-003', 10, '2025-09-09 13:15:56', '2025-09-18 15:45:36', '[\"\\/team212-app_fit3047\\/img\\/products\\/1757557375_68c2327f69d64_0.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557375_68c2327f6a005_1.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557375_68c2327f6a257_2.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557375_68c2327f6a6a7_3.png\"]', 5, NULL, 'Sustainable', NULL, 'No'),
(17, 'Guatemalan Antigua Coffee Beans', 'Full-bodied beans with a smoky, chocolatey flavor and a hint of spice. Best for drip coffee and espresso.', 40.99, 'COF-GT-004', 122, '2025-09-09 18:40:31', '2025-09-11 12:23:57', '[\"\\/team212-app_fit3047\\/img\\/products\\/1757557437_68c232bd8c74e_0.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557437_68c232bd8ca4f_1.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557437_68c232bd8cc37_2.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557437_68c232bd8cdf5_3.png\"]', 5, 32.99, 'Single-Origin', NULL, 'No'),
(18, 'Kenyan AA Coffee Beans', 'Bright and fruity beans with berry and citrus notes. Ideal for pour-over or cold brew.', 56.99, 'COF-KE-005', 131, '2025-09-10 21:30:00', '2025-10-01 11:09:32', '[\"\\/team212-app_fit3047\\/img\\/products\\/1757557505_68c23301a6a93_0.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557505_68c23301a6cf1_1.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557505_68c23301a6ecf_2.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1757557505_68c23301a70a3_3.png\"]', 7, NULL, 'Blends', NULL, 'No'),
(32, 'Italian Espresso Blend', 'The Euro holiday may be over but you can drink your coffee like you’re still on it. Italian Espresso brings a taste of Italy to your morning brew. Bridging tradition and innovation, it honours Italian espresso heritage while boasting specialty roasting. ', 43.99, 'IE-BL-01', 99, '2025-09-15 17:07:50', '2025-10-01 11:09:32', '[\"\\/team212-app_fit3047\\/img\\/products\\/1757920070_68c7bb464c7f1_0.png\"]', 10, NULL, 'Blends', NULL, 'No'),
(33, 'Wide Awake Strong Espresso Blend', 'Our darkest roast that is guaranteed to get you out of bed in the morning. Rich and decadent, each sip delivers a punch of flavour that rouses the senses. Experience the awakening. Experience Wide Awake.', 29.50, 'WA-BL02', 56, '2025-09-15 17:09:53', '2025-10-09 12:10:28', '[\"\\/team212-app_fit3047\\/img\\/products\\/1757920193_68c7bbc1b5ec3_0.png\"]', 5, NULL, 'Blends', NULL, 'No'),
(34, 'Orthodox House Espresso Blend', 'Orthodox is ST. ALi’s original house blend - the one that started it all. It’s a perfectly balanced, medium roast coffee that’s as versatile as it is delicious. Crafted with carefully sourced beans from Latin America, Orthodox delivers a smooth, rich cup whether you’re brewing espresso, stovetop, plunger, or pour-over. It’s your go-to for milk-based coffees, but shines just as bright black.\r\n\r\n', 31.99, 'OH-BL03', 73, '2025-09-15 17:12:04', '2025-10-09 12:09:44', '[\"\\/team212-app_fit3047\\/img\\/products\\/1757920324_68c7bc44218fa_0.png\"]', 5, NULL, 'Blends', NULL, 'No'),
(35, 'Good Vibrations Espresso Blend', 'Take flight with Good Vibrations - the coffee blend of choice for space travelers and transcendent experiences. Vibrant, aromatic, and full of positive energy; Good Vibrations is rocket fuel for your next mission - wherever life takes you', 32.99, 'GV-BL04', 82, '2025-09-15 17:13:46', '2025-10-09 12:13:52', '[\"\\/team212-app_fit3047\\/img\\/products\\/1757920426_68c7bcaaa9aa5_0.png\"]', 5, NULL, 'Blends', NULL, 'No'),
(36, 'Feels Good Organic Espresso Blend', 'If you\'re here you already know that drinking coffee Feels Good. But it feels extra good knowing it\'s 100% organic, ethically sourced and perfectly roasted. Each bean carries with it a story, culminating in a cup that nourishes both body and soul.', 21.99, 'FG-BL05', 0, '2025-09-15 17:37:45', '2025-10-06 05:05:55', '[\"\\/team212-app_fit3047\\/img\\/products\\/1757921865_68c7c249756ca_0.png\",\"\\/team212-app_fit3047\\/img\\/products\\/1758181544_68cbb8a8970fc_0.docx\"]', 5, 20.99, 'Blends', NULL, 'Yes');

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

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

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `email` varchar(255) NOT NULL,
  `first_name` varchar(50) DEFAULT NULL,
  `last_name` varchar(50) DEFAULT NULL,
  `date_of_birth` date DEFAULT NULL,
  `avatar` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  `role` varchar(20) NOT NULL DEFAULT 'customer',
  `reset_token` varchar(255) DEFAULT NULL,
  `token_expiry` datetime DEFAULT NULL,
  `nonce` varchar(255) DEFAULT NULL,
  `nonce_expiry` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `users` (`id`, `email`, `first_name`, `last_name`, `date_of_birth`, `avatar`, `phone`, `password`, `created`, `modified`, `role`, `reset_token`, `token_expiry`, `nonce`, `nonce_expiry`) VALUES
(1, 'test@example.com', 'Admin', 'Test', '2005-10-02', NULL, '0412345678', '$2y$10$NPOB7ZGuU7ZIzJ.iUqv0y.bWWgpASOSRxvHlY5em5lK1moJCFf6tq', '2025-08-17 13:05:04', '2025-10-08 21:47:57', 'admin', '1dab8e73fbd548e877f83c4cdaea1235eb3beba9f916f5a8aefec1d99765dae8', '2025-09-18 17:29:03', NULL, NULL),
(5, '2313888745@qq.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$ll5B8a72pDDL5RnwjU8wrucYGRi7Gg8vvsAUi.XHtHcCJzVsLZQEq', '2025-08-17 06:30:15', '2025-09-18 12:19:56', 'customer', 'ec1289e6d5bbaab69404d598f1253354504c37ec2f4d88b3727e88ee5c86854a', '2025-09-18 13:19:16', NULL, NULL),
(7, '1@1.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$wUbqkHvIKBL/FdfhU4GDAO/AcEIofm0w/u/EVkpmwRNpeqpFhSS0u', '2025-08-18 11:07:20', '2025-08-18 11:07:20', 'customer', NULL, NULL, NULL, NULL),
(8, '1234@1234.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$hgDVGgfEoUSEIp979pvcqu5mAMwGFHsHC06.itum5bfURykY8UuVW', '2025-08-20 13:01:10', '2025-08-20 13:01:10', 'customer', NULL, NULL, NULL, NULL),
(9, 'a@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$D1CRBTC9BT5yyTMalscwBeepJHSEiiET7eN70ydma8gygAhHxqJBi', '2025-08-26 05:01:37', '2025-08-26 05:01:37', 'customer', NULL, NULL, NULL, NULL),
(10, 'kavindisk2003@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$0RfYk27E2jGNHVyuDmgZq.q9FWLI73huz6T8mSYXDj25Ttj15ryHq', '2025-09-11 15:00:34', '2025-09-11 15:00:34', 'customer', NULL, NULL, NULL, NULL),
(11, 'awar0023@student.monash.edu', NULL, NULL, NULL, NULL, NULL, '$2y$10$HnSmLYchT2M8oHO04P8wO.U8GcWsYEgzH74uDI2y.20DFaRTRmlHa', '2025-09-18 17:40:21', '2025-09-18 17:40:21', 'admin', NULL, NULL, NULL, NULL),
(12, 'testtest@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$HmMhuhK0NpEXPWpp/mN/QedVZ/2c7vG60NVl9TcWrsqx10IZbPute', '2025-09-18 17:42:52', '2025-09-18 17:42:52', 'admin', NULL, NULL, NULL, NULL),
(13, 'yello@yoloo.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$OqTPY6paDImuPjVo9/TYNO17mCwvjX5FvtVBL9dRVto2MT5ZcTlsW', '2025-09-18 17:43:30', '2025-09-18 17:43:30', 'admin', NULL, NULL, NULL, NULL),
(14, 'gokulknair2003@gmail.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$DNHTi16TG7GMXUrBfNvYBeUDOzcWrXDxiDUJZV2J9bC6KERPy.NtS', '2025-09-18 17:45:14', '2025-09-18 17:49:12', 'admin', NULL, NULL, NULL, NULL),
(15, 'randomhacker@yahoo.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$ZGFTjh6Z83Q3H9mFo3sIYe6lTojTb1i0eokE8jCz7k23DLlSTcXuS', '2025-09-18 17:48:26', '2025-09-18 17:48:26', 'admin', NULL, NULL, NULL, NULL),
(16, 'test@staff.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$9MzPRDQm1yujIiG3ugLAMe50rsfpvzpHlNQfpXwVTAwWyECcsJHjm', '2025-10-03 13:52:15', '2025-10-03 13:52:15', 'staff', NULL, NULL, NULL, NULL),
(17, '111@1.com', NULL, NULL, NULL, NULL, NULL, '$2y$10$leVyj.iUsjlTUWUQvjE53eLKekZt1qUY7bMkzC2eGkhQTcuJDGm96', '2025-10-09 12:15:14', '2025-10-09 12:15:14', 'customer', NULL, NULL, NULL, NULL);

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

--
-- Table structure for table `user_preferences`
--

CREATE TABLE `user_preferences` (
  `id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL,
  `pref_key` varchar(100) NOT NULL,
  `pref_value` varchar(255) NOT NULL,
  `created` datetime DEFAULT current_timestamp(),
  `modified` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `user_preferences`
--

INSERT INTO `user_preferences` (`id`, `user_id`, `pref_key`, `pref_value`, `created`, `modified`) VALUES
(1, 1, 'roast', 'Medium', '2025-10-09 10:56:16', '2025-10-09 10:56:16'),
(2, 1, 'milk', 'Oat', '2025-10-09 10:56:16', '2025-10-09 10:56:16'),
(3, 1, 'Size', 'Medium', '2025-10-09 12:49:45', '2025-10-09 12:49:45');

--
-- Indexes for dumped tables
--

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

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

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

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

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

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

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

--
-- Indexes for table `user_preferences`
--
ALTER TABLE `user_preferences`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uniq_user_key` (`user_id`,`pref_key`);

--
-- 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 `contact_submissions`
--
ALTER TABLE `contact_submissions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;

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

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

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

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

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

--
-- AUTO_INCREMENT for table `user_preferences`
--
ALTER TABLE `user_preferences`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `cart`
--
ALTER TABLE `cart`
  ADD CONSTRAINT `cart_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cart_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`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 */;
