-- Host: db-master-3.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=34905;

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$Gf25N79jcb.cBWHrBkzcc0jYc1v8ENVGDHIwY6GFNOyg1L.0xx.g9','user','ak_7d68e44402c12e46','2023-02-07 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$BthL3mFpM5xXTwi95oj1.WAIeBHoO1g0AG2iGkSDqqQCaX3x4XT.e','user','ak_5c3f95cbf14003df','2023-09-07 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$TXoLGgfWTKqll2Xk1m9UZpbWqAv3qAODb7QtGa5w8EoT2ijOlBPwL','user','ak_9030862f6ceb989c','2023-08-10 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$py9ocP.gFGvFwunzwZpUDXQfzFnKu4mWnwRRW4FIQfkAj01EJgvaR','user','ak_002be34bb84e2e86','2023-07-27 10:02: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=29186;

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


