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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$NhGJ9fgYv01fGGffHSa/4hqjBrwV2r5aRCr4hu5lPwxcTJn9MOXlB','user','ak_67c59ffe0750dfd2','2023-02-07 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$Kx0TX1UHrq4beoxW6TCRYAldmX12s0Z13BTLFDjpZKJVpJZcNRCod','user','ak_a74977bed9ad43fd','2023-12-17 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$obK9tTbjM2gxf1arP1qkuE7VxXlim6Q49I4ShPZ6yGUx0QHAy1.Jy','admin','ak_c4e39feb065d8928','2023-05-17 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$1UloT/l0CIACpHyvvlOSCOaEUwgJSMye/XNj/.c6fPwNzuuebY6Jh','user','ak_82dfd04293e98ef9','2023-01-21 10:18:00',NULL);

