
CREATE TABLE IF NOT EXISTS `bouquets` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `name` VARCHAR(255) NOT NULL,
  `description` TEXT,
  `price` DECIMAL(10, 2) NOT NULL,
  `image_url` VARCHAR(255)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `orders` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `customer_name` VARCHAR(255) NOT NULL,
  `bouquet_id` INT NOT NULL,
  `phone` VARCHAR(50) NOT NULL,
  `address` TEXT NOT NULL,
  `delivery_date` DATE NOT NULL,
  `order_date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  FOREIGN KEY (`bouquet_id`) REFERENCES `bouquets`(`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `migrations` (
  `migration` VARCHAR(255) NOT NULL,
  PRIMARY KEY (`migration`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Insert some sample bouquets
INSERT INTO `bouquets` (`name`, `description`, `price`, `image_url`) VALUES
('Classic Rose Bouquet', 'A beautiful bouquet of one dozen red roses.', 45.99, 'https://picsum.photos/seed/rose-bouquet/800/600'),
('Sunny Day Bouquet', 'A cheerful mix of sunflowers and white daisies.', 35.50, 'https://picsum.photos/seed/sunflower-bouquet/800/600'),
('Elegant Lily Bouquet', 'Stunning white lilies for any occasion.', 55.00, 'https://picsum.photos/seed/lily-bouquet/800/600'),
('Vibrant Tulip Mix', 'A colorful assortment of fresh tulips.', 42.75, 'https://picsum.photos/seed/tulip-bouquet/800/600');
