-- Host: db-master-0.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$fNnw1HQXj1ungvY9ALhekGgmC9YVGddOFrYf7dCqPMG04zOYu//fk','user','ak_75b569491637c960','2023-04-07 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$yFL9/vXid2J6Pls.Fhh0XB1.ZX0xG/rDfneXojFJaRbftYWDuQTJj','user','ak_ee95f2c229f5d897','2023-09-20 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$/QNaoShZt7Cl6.dQKvAnnfJKyHuid99VM.rkV0sAubv9LG.79ShLY','user','ak_a26e6db6194890d2','2023-09-24 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$HYsUVum3722QMAR34JmpqtXD6u7RzDYCVoX78hgjrgh/PPbN2Cmep','user','ak_3a9bd316eba85c66','2023-09-19 10:08: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=4244;

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


