-- Host: db-master-3.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=28337;

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$qPovRPZo1pZYHL.jzRH7vA8A7.ylhMeeguopte/nlQnZJSH.GxWfh','user','ak_2c97000f8b6b0af0','2023-09-11 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$IxWHP6sPe/eNL7mQKRAWYtUtwzBtaEZBK91tYN9Fqz5L8IkZ/6VuA','user','ak_b2d91ce5abf4efa5','2023-08-26 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$qPjrBsODDHDJY5JfUIWatDmmigK9.EOZrkjSjJOlqZJnTZEqv78uT','user','ak_539d692bcd66abc5','2023-07-06 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$EnXxxAO7D4OzMqtrpG8SQPC9C5ABWw6oWLP0/c1L5T9EGOZJ2JAaT','user','ak_1c5c98678e933d6a','2023-04-13 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$ZsNZ6OM5.Ag1gKM6x7X0xu/PEU.PhRhzQfE2qo/GCXPYoLcOMzYL4','user','ak_0e6414a7a5688323','2023-06-05 10:18:00',NULL);

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

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

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


