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


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

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=7277;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$gRkFA.LITnVnAtASQE1OWtUP8vBniBKe15nxLVM7Qre99vJ1pEN0J','user','ak_4ad3827777b08ee4','2023-01-09 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$KrkSTT/NSWfxRihAPulhf8vVwfanpDHNU/GPK0qRdgZzpQ41CW7Lg','user','ak_a10af0170a0ece8e','2023-03-17 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$f1p6WVQw6hHEbyoVWwTDjRS7e0quNgkG35ktrpm071udnRTFcOjlh','admin','ak_8eb1e706ec171dae','2023-04-19 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$9q0kwZjHYMKV/.uZnREIohTz8lg.unFhE86hIpP8MH7i/JbENfxfc','admin','ak_6226e149cf7522a8','2023-06-26 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$JkeO8K1jCGf6z4Z27WY8JXxuaQjedxqJkKsFWbTnEJ2TKHekr166e','user','ak_80962413e8f00cc2','2023-11-15 10:17:00',NULL);

