-- Host: db-master-6.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=15082;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$Swe7EvLdlqVgg1f2o81yKZYyGf34EyDzbdG6tRAQCSwCDRNtSs4gB','user','ak_7ffadc3f5783cb17','2023-03-28 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$J2K1xNNr8qrpdqOk05o0cGyHFaHrbfCrDLmBoAXAQe/VvDg2kytIW','admin','ak_23f76b63397775cb','2023-10-17 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$QvYK0MYfl1hI1wXBYSnxYyFXIeT/gY.pghnTMKkHE3096RPWAN082','admin','ak_a2fa96abcf90e786','2023-11-08 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$tBx4KxpVOqcs/tjPgqWGEx1OlSHK71f6GcvphkItqokTQPr979XDV','user','ak_9963ed15436d5b28','2023-11-15 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$5iBTQvwMHAi..xf59dOhIBKOwE3MZfsEXzNHevUy2M62mWwe9zcAg','user','ak_43fd87bfd697b509','2023-07-19 10:02:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$VzOG7oFCoOYSUdHUWTwXV45jC0tngYDelWXINdz6r4dqHhjjm.b18','user','ak_41e569aa3356a780','2023-02-02 10:22:00',NULL);

