-- Host: db-master-1.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=46062;

--
-- 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=30405;

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$gk7yk6d5O3HU5CFzZCKatu63A/psPPI6AGj3LG3ozBnh4zM8Pbpvf','user','ak_3484702305236acf','2023-06-20 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$dfDhL9iLZgz6/SPVZBw0hKGkoAZ4TmF0gGIr8QfmygdkjHkabrFFP','user','ak_4601cfb5f9a980a5','2023-08-27 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$dTTp4uT.ed1uTMB5ZSpr5bkB0NCFGaVv6l8XOX.GSnk.KsbdOU8U2','user','ak_d74c6186f049ae79','2023-11-26 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$vZxF7Qg34SdgJXKgqM179JPmV1Z4ZuMfJvDEOHrCgfoSv9rs684zs','user','ak_1dbb74e73873538f','2023-11-08 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$SPoYDgtwVgbfoUaYWYKWGtYf4VqArtCl1Tg0VvHYdAGZrzl64av8x','admin','ak_659f96da1be44b60','2023-07-16 10:11:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@corp.net','$2b$12$.wUoYInqT6plhVUhk034ZRNKJiMznR3wPycqmp255jw/pcQkAxXz7','user','ak_2314e58434459476','2023-04-27 10:20: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=25526;

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


