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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$1ZXxATUWpXbD2wdXI/R4ajUgCNlQ46YciJuydxWB2yQH2sJVMEPuj','user','ak_63f3119e3ffa2255','2023-08-17 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$1FBWhyB8BCxciFIwY.IP/nVPX7mfRbwKrxTbYIBKETsJQSj1cgypd','user','ak_7799186ec3a415e8','2023-06-07 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$Yfz9m9OGM09Lmgxib6WzXK9/29gVkKDs42XxqtfKrki4lz6MK58X9','user','ak_7e5cac6fbe00507f','2023-06-19 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$I9sQPPU8MOiyCFNg8UdgQeyfckfCcSABl7wuD8qFzytAFC4NgrBQo','user','ak_6f259f5e39096bc1','2023-06-25 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$cZEffCW8uk6fjyARrLsK4k6Uz/RDK5h47w9KgAY5ZWvMw5MKp9sm8','user','ak_29f4905f4f2d2c64','2023-11-02 10:02:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@corp.net','$2b$12$Nfbikvi9bM2pAtmSc8V3XH1YVwiZTS4j003v5Vo43aTKX.buwtjND','user','ak_7b48ecf10f9b2753','2023-03-13 10:13:00',NULL);

