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

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$gyoDfPl7pt/.L/AzKzXQovvC0KWUBQkz/CHRevLbEagkFkNBF98wk','user','ak_488be49e5c738a5a','2023-05-16 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$QTMuzBV8R5i2sRQsbAU17ZSzPnLIGkFb9qD1tWF4XYj9KRhsqqLYR','user','ak_162d9e93c97c53f4','2023-06-03 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$Mr22pNIVWD9.e1NC7fMddtmzLMYN9.YBWt8PviNSrrJ/RgWY5lKbj','admin','ak_c1570f63d12a12f4','2023-10-17 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$rrITAQSJb6rYxCw.qJcHdidtqdUQDYaicN9j64aAjwOMsvLuqTyaY','user','ak_e1b8e747f65b55e7','2023-04-13 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$1WMmFroarN7Rg1hkQ5vGtIw1Blb3689BGYH3RrlPmZVY9No17JhSH','user','ak_f92c0bae37bfeecc','2023-04-08 10:01:00',NULL);

