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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$U9Q.xXo195uXClItwkO95TmBPH8VvfLvUmtftshUuJu4LJ9s9M7u1','admin','ak_102245dd7b8159c0','2023-09-08 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$Yj6O1DQnyhHbSvs5wAazrS3O9pQwmIfA2yEXHT3.NV2ylHwy/NdDB','user','ak_c9471e68bc54367f','2023-03-16 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$Q3jRnqcMq9Pk2Nqb1ULbtW8JrFopbGhsZZ4RvyGzIoZJ.q3bEIP4U','user','ak_5a05ee278a56e7db','2023-03-09 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$kgXLFIg4NAwGyWM6fOddXbycrqyxTVrmxiYTczkKnCGgOw/EyYKEX','user','ak_986e3d3511af0fe7','2023-11-26 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$rbwvWEENOGoVwRgTGLmLEIwhBi0RDBp4VBGS.Hqx7MjFjc.yINvUr','user','ak_0c2f470ce680fa82','2023-01-15 10:03: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=33465;

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


