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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=1460;

--
-- Dumping data for table `audit_log`
--


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

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$LkhMz5ldAwRtM1a81aVfo0y0v9tp9SpGuBFXgVhl.q7M4ISx0Va0O','user','ak_e1da38077db8d48b','2023-02-02 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$vM8/6wnhZZmiE5n7EFDVHsLjqaB4H9eybXzsGcgLP0eQpudhyv1..','admin','ak_8ce02a878bf97788','2023-12-22 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$DjVXGoxCx.ZPaRDI7WMUoQzY5HT8TaLGo.aQo9ciW.ukY4TOpUYpE','user','ak_8d706edb93a9c922','2023-12-12 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$lbn2SZMRZzH6CqsF7CqAQbOoVQ6DksQtrzPSDM5xrFQTbnirvUzu0','user','ak_53e78ec7042ac992','2023-12-01 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$yPqsFIl/Ugx4djk8vSrUzO9c5RKIMIGraTnVUcRAgQKJOzTMbBDmX','user','ak_3bac1fdbec0db84c','2023-09-23 10:03:00',NULL);

