-- Host: db-master-4.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=24739;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$pvF1CD9hwSZD2ZDW.ertR/6DeKD7mfyZOMxfVQSbysazZR6m1Lc1.','user','ak_10d840eec41928de','2023-07-24 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$PzZIfuuZfLkOGkPZBjmNUEBQdtDt7h8n4y9WMxp65Q9S/7BB/Qvzs','user','ak_988dd84018ab980d','2023-11-12 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$3jlwy.8JcTb42lsDV0vgqM2e5./9fCE0xAftP76BFa8q3toIvgBMY','user','ak_9d3bdeba755d83a6','2023-02-07 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$y4GqmmsNnCQOMOx7uxyqJO6JrBkqS4jER12E5Plf9K6soEfAvYNLx','admin','ak_3f3fc0b98efcf360','2023-10-28 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$4hZWP2LfGwldBhvGEqAvpFYUdYvgkFTCmdDv7jkfzZToMsCQiopTP','user','ak_3336d162d61f4921','2023-10-09 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@example.org','$2b$12$7yinfAaBzKYVAQglz6l1aUw4Ep5fUUITpmegmqtnsU02mBZ5triSl','user','ak_3852f96501cb05b0','2023-01-23 10:08:00',NULL);

