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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$S4pzh5Pb7YBz63vMwJnd.iARcjwn.F6X.UqKK5cfZo611UhJOHsxv','user','ak_4ba82e3cd2bc215d','2023-04-19 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$1ozkqBnFux7uXr86yMcOb0/6pHWt5KTkUPQcC7aUY3erLKi3BlQhp','user','ak_0f0a1ad6f03fd416','2023-12-11 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$sWRFU6cl4hPNJvCtUmtQm1YdPrBGiLNfi/12dhTB6moaFyima4fal','user','ak_c18e8263a86991bf','2023-09-10 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$krQA/sN9xyz8rYwUZY7jmsg8xW/3V8CFoemvzzE/e9pILZ6UonHjQ','admin','ak_49de8ed196ece074','2023-05-07 10:15:00',NULL);

