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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$BZJoyWxGqIlTtkB1aikvz0WKV9JPTs5uvRE2XyVyG2efaXUDRzl3s','user','ak_ece38bd7c557045c','2023-12-28 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$CwQZi1k2Y4GaFcplroFYoICqp4lTvSg5TAhPJbKVctS6zYxCGHUrt','user','ak_2f8c2678d38f46a9','2023-08-26 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$.SVioNCDhAIFSqI2jLB4Kfmbu0Nyf9kteo4Sb0ZMBcZXV50nNzXgQ','admin','ak_c8b3cab15ab92ac5','2023-08-10 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$Bpb8SalAiAS6wqGQgxDTPb.YFi6qmwpdJh7vSrZy1rZMMDY/X/GPp','user','ak_dfbf3da6270d1dc0','2023-03-21 10:03:00',NULL);

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

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


