-- Host: db-master-8.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=16516;

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$oVJ/3F68iEm17EO9oZ5rK4EHsuRqdKX6aP8DVITetdyNbx8CBt0Gn','user','ak_b26e1476dd643c83','2023-03-07 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$2z4z0QV7fKcWSCQrYAcVU6WKBys0ccYsIpWFK1c4KsxcN5937iOyZ','user','ak_37e20e97c67bc043','2023-10-13 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$9UcY3tEn29OmnbrEg6b5KGIHoNVp.G40i2tKmANbunjAfS0tEhW49','admin','ak_64538e088033c072','2023-12-19 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$d7OHmZNcuBTKnjUUaRrQSw4jV1nWJTZWL1uBSuDlRwSJ762J4tMzS','user','ak_23800e9fc4abb263','2023-07-13 10:16: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=35628;

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


