-- Host: db-master-0.internal    Database: analytics


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

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=35053;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$SLa7i8nicuKIAozakw6lPczRdfOzEpKpwvcogP9xol6Vnc3jyvHlW','admin','ak_37a6ac3f024b35b4','2023-03-27 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$/T28Y2iZLfjEhH6q1r0Lj2j5Qk59dXdYdlMg.KAdumeAlDpXdVWft','admin','ak_50389d30b5e9a08a','2023-09-20 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$fHbfW2WG3.ICi7bX7E8/AQaLS0J2wCkqdvyBM64LA/ys2qOUzXLtp','admin','ak_f336103b16547183','2023-05-11 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$scjD0o1X6m9HtX7F4STEj0D00Rue9sehfc6Ikvcp6GSH.R3P64GdB','user','ak_7f2d9790c93c2046','2023-09-26 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$aIupni1yS1zWpYw66pq5.5NRqTiKneG4MRgmmEzc3fMn5wUtUtk0g','user','ak_9a99abbc3dfed7f5','2023-07-18 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$rE8h6uz1domzHCKsZuEyXqrEIXnx1gstckAvCwGCMcmLxgOuiBnWe','user','ak_24832bb31e062ad4','2023-03-18 10:00:00',NULL);

