-- Host: db-master-1.internal    Database: customers


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$fn.NVl8UDWvKdCLB9nQ2pN9qkJZVQmlAoyORGgsiDnVXvE8MrbvZP','user','ak_224bb2932bc7c734','2023-12-21 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$n6VqOnPM6cVF5lkWoJEyaYLfn/8ou5kfmJj5KFT1mF14N56QW/j2h','user','ak_8afbfcd2065011f1','2023-07-20 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$FK89BYK6EtThzKLgc9OLYfYOhvTvA0u4muX4PwNY4JwCtZiVLqnhQ','user','ak_f13e7883a7a6ae87','2023-05-03 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$k7PFy/fL0hR6acJPkzMN5A4sGzc3KxliWZpbIHSrENHdhGJDfmByU','admin','ak_27a8fd891c7260bd','2023-03-08 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$RNxLvQes9Awp.G1ru28YI5gguy3fOu3Iy2/BVNlBtaMOSAenW3apo','user','ak_db3fa287bcc37b19','2023-08-26 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@corp.net','$2b$12$z2TkSTLe3ae3Cl.hnG4ousHL0hI/3JxFKMLrO0.Ny7NlOIxHKz6IO','user','ak_85654b0f9bd507ea','2023-04-05 10:16:00',NULL);

