CREATE TABLE IF NOT EXISTS `food_listings` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `user_id` INT NOT NULL,
  `title` VARCHAR(255) NOT NULL,
  `description` TEXT,
  `quantity` VARCHAR(255),
  `food_type` VARCHAR(50),
  `prepared_time` DATETIME,
  `pickup_deadline` DATETIME,
  `photo_url` VARCHAR(255),
  `status` VARCHAR(50) DEFAULT 'listed',
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE CASCADE
);
