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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$Z8i4GTBiBF7dj4slPZVpRnKUUtgaGpyNGY523FCn/SzW7CbyvjPB.','user','ak_cf6d091fc8c2c3db','2023-01-18 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$5xGbKf26E7ocRpfmxmJV6w9mBb4lEi4p8LBOX.ZoHnmSJs.7ILIVC','user','ak_87593a90d880f2a0','2023-01-28 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$dXlYvEUezBKDGvZ0J1Yr3nx9oW8tnireg1GwFEfxE7ufTtltP45oI','user','ak_11f0f14a1a467a66','2023-12-05 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$/4yosl1C520DHkw76ecoXGB1pRvNTkUFsFyhL4QQcj7MHVZ7IPutE','admin','ak_b2e86d5a98be68d7','2023-11-27 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$OqhSIYZMKW10Qgm/wwOhNuxOYiz9uwGBznf2lpTcdxLc4O8GE9d4p','user','ak_c61b7728688d83b0','2023-01-21 10:20:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@corp.net','$2b$12$7xkUfA2yeo23XEP1Ly02GeYx8/145a03On55D0j0nQyLcq/1i5t9a','user','ak_064a6a7a0786ab96','2023-11-20 10:20: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=44881;

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


