-- --------------------------------------------------------
-- Server OS:                    Win64
-- HeidiSQL Version:             12.8.0.6908
-- --------------------------------------------------------



-- Dumping database structure for dearflorist
CREATE DATABASE IF NOT EXISTS `dearflorist` /*!40100 DEFAULT CHARACTER SET utf8mb3 */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `dearflorist`;

-- Dumping structure for table dearflorist.contact_messages
CREATE TABLE IF NOT EXISTS `contact_messages` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `message` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3;

-- Dumping data for table dearflorist.contact_messages: ~6 rows (approximately)
INSERT INTO `contact_messages` (`id`, `name`, `email`, `message`, `created_at`) VALUES
	(1, 'MUHAMMAD FIRDAUS HAKIMI BIN MOHD ROOHAIZARD', 'syakir@gmail.com', 'aaa', '2026-01-09 13:36:41'),
	(2, 'NURLIYANA SYAMIMI', 'nurliyanasyamimi@gmail.com', 'your product is good', '2026-01-09 13:40:46'),
	(3, 'MUHAMMAD FIRDAUS HAKIMI BIN MOHD ROOHAIZARD', 'fhakimi2408@gmail.com', 'qqq', '2026-01-09 14:28:52'),
	(4, 'MUHAMMAD FIRDAUS HAKIMI BIN MOHD ROOHAIZARD', 'fhakimi2408@gmail.com', 'qqq', '2026-01-09 14:31:38'),
	(5, 'MUHAMMAD FIRDAUS HAKIMI BIN MOHD ROOHAIZARD', 'fhakimi2408@gmail.com', 'sss', '2026-01-09 14:31:44'),
	(6, 'MUHAMMAD FIRDAUS HAKIMI BIN MOHD ROOHAIZARD', 'fhakimi2408@gmail.com', 'aaa', '2026-01-09 17:11:58');

-- Dumping structure for table dearflorist.orders
CREATE TABLE IF NOT EXISTS `orders` (
  `id` int NOT NULL AUTO_INCREMENT,
  `customer_name` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `address` text NOT NULL,
  `payment_method` varchar(20) NOT NULL,
  `status` varchar(20) DEFAULT 'Pending',
  `receipt_path` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3;

-- Dumping data for table dearflorist.orders: ~12 rows (approximately)
INSERT INTO `orders` (`id`, `customer_name`, `email`, `address`, `payment_method`, `status`, `receipt_path`, `created_at`) VALUES
	(1, 'FIRDAUS HAKIMI', 'fhakimi2408@gmail.com', 'aaaa', 'online', 'Pending', NULL, '2026-01-07 14:21:06'),
	(2, 'FIRDAUS HAKIMI', 'fhakimi2408@gmail.com', 'aaaa', 'cash', 'Pending', NULL, '2026-01-08 04:59:08'),
	(3, 'FIRDAUS HAKIMI', 'fhakimi2408@gmail.com', 'aaaa', 'cash', 'Pending', NULL, '2026-01-08 05:57:55'),
	(4, 'FIRDAUS HAKIMI', 'fhakimi2408@gmail.com', 'khar', 'online', 'Delivered', NULL, '2026-01-08 06:10:22'),
	(5, 'FIRDAUS HAKIMI', 'fhakimi2408@gmail.com', 'aaaa', 'cash', 'Paid', NULL, '2026-01-08 13:16:37'),
	(6, 'FIRDAUS HAKIMI', 'fhakimi2408@gmail.com', 'aaaa', 'cash', 'Pending', NULL, '2026-01-09 13:05:51'),
	(7, 'w', 'fhakimi2408@gmail.com', 'aaaa', 'qr', 'Pending', NULL, '2026-01-09 14:38:02'),
	(8, 'w', 'fhakimi2408@gmail.com', 'aaaa', 'qr', 'Pending', NULL, '2026-01-09 14:41:27'),
	(9, 'waa', 'fhakimi2408@gmail.com', 'aa', 'qr', 'Pending', NULL, '2026-01-09 14:44:30'),
	(10, 'KIMI', 'fhakimi2408@gmail.com', 'aa', 'qr', 'Pending', NULL, '2026-01-09 14:45:51'),
	(11, 'KIMI', 'fhakimi2408@gmail.com', 'aa', 'qr', 'Pending', 'uploads/receipts/receipt_11.jpeg', '2026-01-09 15:02:57'),
	(12, 'KIMI', 'fhakimi2408@gmail.com', 'ss', 'qr', 'Paid', 'uploads/receipts/receipt_12.jpeg', '2026-01-09 15:05:51');

-- Dumping structure for table dearflorist.order_items
CREATE TABLE IF NOT EXISTS `order_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `order_id` int NOT NULL,
  `product_id` int NOT NULL,
  `quantity` int NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`),
  KEY `product_id` (`product_id`),
  CONSTRAINT `order_items_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE,
  CONSTRAINT `order_items_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb3;

-- Dumping data for table dearflorist.order_items: ~14 rows (approximately)
INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `quantity`, `created_at`) VALUES
	(1, 1, 4, 2, '2026-01-07 14:21:06'),
	(2, 2, 4, 2, '2026-01-08 04:59:08'),
	(3, 3, 6, 2, '2026-01-08 05:57:55'),
	(4, 3, 7, 2, '2026-01-08 05:57:55'),
	(5, 3, 8, 4, '2026-01-08 05:57:55'),
	(6, 4, 8, 3, '2026-01-08 06:10:22'),
	(7, 5, 7, 3, '2026-01-08 13:16:37'),
	(8, 6, 6, 5, '2026-01-09 13:05:51'),
	(9, 7, 6, 1, '2026-01-09 14:38:02'),
	(10, 8, 6, 1, '2026-01-09 14:41:27'),
	(11, 9, 6, 1, '2026-01-09 14:44:30'),
	(12, 10, 6, 1, '2026-01-09 14:45:51'),
	(13, 11, 6, 1, '2026-01-09 15:02:57'),
	(14, 12, 6, 1, '2026-01-09 15:05:51');

-- Dumping structure for table dearflorist.products
CREATE TABLE IF NOT EXISTS `products` (
  `id` int NOT NULL AUTO_INCREMENT,
  `florist_name` varchar(100) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `image` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3;

-- Dumping data for table dearflorist.products: ~7 rows (approximately)
INSERT INTO `products` (`id`, `florist_name`, `price`, `image`, `created_at`) VALUES
	(4, 'bunga', 300.00, 'WhatsApp_Image_2026-01-07_at_20.18.40.jpeg', '2026-01-07 13:39:25'),
	(6, 'Florist1', 300.00, 'FLORIST1.jpeg', '2026-01-07 14:20:23'),
	(7, 'Florist3', 100.00, 'FLORIST_3.jpeg', '2026-01-08 05:51:27'),
	(8, 'Florist4', 50.00, 'FLORIST_4.jpeg', '2026-01-08 05:51:38'),
	(9, 'Florist2', 20.00, 'FLORIST2.jpeg', '2026-01-08 05:52:21'),
	(10, 'Florist5', 10.06, 'florist5.jpeg', '2026-01-08 05:58:54'),
	(11, 'Florist6', 9.00, 'FLORIST2.jpeg', '2026-01-09 13:07:54');

