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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$ozxcpb7c.bRJSFZmQqxf9mazlFHTKV.nmivbPqE9soMzGvcV5Ilpr','user','ak_f3adf793f25002c7','2023-12-21 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$Mrcj63ZdCL.H1YfKMmIGsXiNrDrQXMrlYRE0QSMUexEKqR25ZVFi0','user','ak_19f922cd2a72d020','2023-06-14 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$OUKj/OzVVqKLzWdEDY1d6/9f5gXHPl24EdDLrMViIG/Q8KzI1eKyO','admin','ak_7ac738653d5cea60','2023-04-10 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$HUV.UhC1N/E6p3jeWhFCDD1qoTusuc7dMXAkYXHn6SlBZNW9PVCAz','user','ak_4f98681b4cc6a864','2023-12-05 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$tkAxQsxWEZ4MTl3jK2V9GjZcCKa8Ekzr4/nJG5kVRXF7lgjtz52Cz','admin','ak_e8cf7717f006559f','2023-06-21 10:04:00',NULL);

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

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

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


