-- Host: db-master-9.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=37907;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$.6j7DWCjjq.VgVq3dZGxFhUOZWcHs14T5fRlFQS8t/JtemnpGEtoV','admin','ak_04adb49152e17fb3','2023-07-17 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$QHS6rWIQH0IiLohbVI2.I7jlkOKhEGxgaciZkVsSDF0jFIt8ca4zF','admin','ak_319f3c1577c1b544','2023-12-08 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$TliPVJQ5z/ykLVOj9ACFqLBXHnTOfj6bjTN1fx8Jc.D9DJCc0QYyW','admin','ak_a2af4b8e41e16a25','2023-02-21 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$moo1RdCH3C4Dw6ac3H4tpwf0hV.4EJJ/2ycRsVHiKczARpGYmQ0l8','admin','ak_df7f906886ebdf25','2023-07-05 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$tx/yX6r96Rs1djGpsku6XXCVREW3dYT3iwLivzjhDsbwXrCNFW4gK','admin','ak_51552082fb266ef6','2023-09-05 10:02:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@internal.io','$2b$12$tNl46cNYnqGrE5rRXlOmKZV3zzkFFMbYhUQofChHug6hRY9aFzmbU','user','ak_d87c2e2a982f12b4','2023-08-16 10:14:00',NULL);

