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


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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$EE6qmn1sif/QPueiuQQBY.YvW7b.xRhUI8grH4VSI6teOHLVqjmSD','user','ak_7c2bd0326f689291','2023-05-09 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$eZL8f.NMEhThUv9.HQuQ3tTytsOge4EaAD5eUH9sAttRrOMt4dMlP','admin','ak_fd2f2ea2ad7b8e2b','2023-04-13 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$3Vt66sLbepoBPbqNs16gCHVHJAFjVIQNR.6DgZ4kxRyTqKLkORieu','user','ak_4a54c7322b1f52f3','2023-09-16 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$t5AUHZMxjrCN469po8IUTTgyLlLpHvrxjZa2gGdsVXIJSBlZ7spm6','user','ak_222ead52a2abfb31','2023-09-16 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$/ghvqV4tfDCV7RtTXW2SJoy.9eDw.GP.q7hhQcKEWgMyBcMdYqG4I','user','ak_46691a544aff3b48','2023-03-26 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$zncT/PDfw1xlSMYbfVK5CyPJXLSbLaj2RMAER4HI.ggw8qDPsf/Uo','admin','ak_e0e7c7f2ae166608','2023-07-25 10:06:00',NULL);

