-- Host: db-master-1.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=48802;

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$40qsBTUxIIsvFTnQFVgA3GBwPu/LKRPxXlMcDIu12utb.iO1F3SKX','admin','ak_cedc91524cd6028b','2023-02-16 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$KBqfsv5YkQf/TTM24lbaSQqJBQcDA10xH9EoasUuPv2j3ifyqPOwP','user','ak_65657a5d9c0efaf7','2023-04-14 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$ohHfzF3VRFoIiHlN3oupx4WhL8TYGApnUrBI/g8e7DkBN1TD83vwD','user','ak_7e995233c35dc414','2023-08-14 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$AXwFzGlMtOEODq1xMH5MjeGsUZSgV3yblyZg4wcWIqoGi9uYvfD8q','user','ak_8affc4379462480f','2023-05-04 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$bdUJ2wGOr7sohA8aUncjP1OaqaPd0be1.i5FhSLCjoiWUs.UhzPKY','admin','ak_4b65aef868d11e57','2023-04-22 10:15:00',NULL);

