-- Host: db-master-5.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=20057;

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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$JkfNF36ObZ/Nhb0WSIx5TBoYE4N6e/T5IUHkxqrWjCH1dIbzgNIH0','user','ak_e012d3041780788b','2023-06-28 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$eFdd5G53lR7w0gnD4Xpkjk1j4FLFzyQ1Soko4SpuZlwGr6.BXRjpr','user','ak_38e8f766c055d9be','2023-07-20 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$l3yHXWs8sOP46xhW2BqocgLUovIarQaKdEfK01.GnjTkoQiW0OAZx','user','ak_b3b32ac32bdd2e3f','2023-07-14 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$zPT0Lw6b5E1n1ggeWfUYfyhVs8PvNXELc0rCUD25Pp6QZWnhPtLDS','admin','ak_a6102b55c2a6f692','2023-10-14 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$OJMmrLY4O4BBZso6DrYkO8oRckZzC4uQqDh0uxqgFmAITxFURnh5/','admin','ak_6de7041399354b91','2023-07-07 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@example.org','$2b$12$ZaTvgpNP.f7hYb6.YJR4ADx0Z/0RDrRHcizihGl.VxIpWTEpzMFDx','user','ak_9bb0b65f5de2c982','2023-07-04 10:08:00',NULL);
INSERT INTO `users` VALUES (7,'admin@example.org','$2b$12$fxM1VcJFmqU1z2IyyLvx8kLgV3prYHkYal6eWgmm1xXCmUT8RvYXD','user','ak_cde0812d9af80e83','2023-05-14 10:14:00',NULL);

