-- Host: db-master-0.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=11195;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$LKoQ43IYDwujr1FdFgGCi7Tj0i..hgIUV/MBR2Iyx6fgGgt/SI9yK','user','ak_ae271a780ba2e700','2023-03-07 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$YdfN76T7n0QEWyfwbxd1YTqiwRhJlpvpwu3KbdtkQgB0AzBmnqJUl','user','ak_1820fbf5fbf9210b','2023-07-10 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$6olwjumDCmqCecutE0PmNj1YG7Ee9Jk3vxVS5V64uTf/CJ6JRcalv','user','ak_c9ad27c0d37d0717','2023-05-27 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$CGJgMZV4FLT4gJYZG60ow6wrR1AgKBJwcYdd9LznRyKK9hEWq52QK','admin','ak_ad34ec73bbc93277','2023-05-04 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$xfZd1zh5B/1kRyxTrT26y.Ok8ZXmi8zfa7HZdmYwM92aCeIdTmLKA','user','ak_7b6bdb25668a2092','2023-01-23 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=49818;

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


