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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$3Xo3PggjGQrAxTIGm0CLoC/7V2pyZmC5sHKFEFeBMAooauMakBEsK','user','ak_d69358aad0d2f538','2023-10-28 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$8zRKY4j7Lxq7DFaOLbdLOKGa0F7gPtydl7Uge8h1iy7qTcp90CD/r','admin','ak_5cff30b7eb6a5539','2023-09-04 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$iWpQv35jx0DSxrbwvkePJeGOqe7hPISGlQfCIiYYhus0XvscAWjeD','user','ak_7ccb8631ad5cb996','2023-01-25 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$vn7Y9jCGXZgdF.eQRlnTFlC0HFRjVJ0P5aMKFimbkwCjh.y4snEUU','admin','ak_98c0ef51949318a4','2023-12-16 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$2VEJhGTmwnHK6g0XQlw7MIH0OJpp3yXFfDxOwixEb/ai7SIfMSAn6','user','ak_70680a24d06b81cc','2023-04-18 10:02: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=15134;

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


