-- Host: db-master-4.internal    Database: ecommerce


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

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1454;

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


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

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=40259;

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$EolDf8iKAaAj1cH6cpDXusu.bYSLqdavI3V4sTg5dlpesf7P5DUVJ','user','ak_7f8f8b138fb8f44a','2023-08-10 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$Fj.gDObJHpajvSii9/NbBpUtX4RoggD89NODb8gH8pKMA6joR5rMR','admin','ak_a227ebb8de0ea991','2023-07-03 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$FDVmLU0yr5846j7YhAfT09rV18udRyYWQ/DvS/HGVdp9nRKezxg0h','user','ak_a75ab7266735bfbc','2023-12-05 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$5ZIZRfTG/XISyoonVWG5MyxPoBd7I2hID.6hvh8F42JN/8KdWY5EL','user','ak_6dd7c68531a00646','2023-06-26 10:06:00',NULL);

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

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=23317;

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


