-- Host: db-master-9.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=8585;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$gvzvPRJraeZdxFTpPCN41ggjlfVwy6TMXB9yRd5Wz0uJn.dyO7CU/','user','ak_2fae90bae65a38bd','2023-01-20 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$teG5HhzZBNz0OFkr4dbhPlS9MOT1473/uw0OZDcXpEyRBhKRpvEjs','admin','ak_ffe692fe5dcd90f0','2023-09-12 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$owtbg4RcuEHAX/uV2MDufqI0tLQtnbZaTM8kzrseRa2yaexVrEM9t','user','ak_97fb6012800156e5','2023-07-14 10:23: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=4956;

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


