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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$B5MJEK7EzGDeY59LARUHlyCEM9RwAUx3tOn8J7qWyq6gdNarb8vZD','admin','ak_0b9ad90447fa3b7d','2023-01-11 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$i94.gGCgzWeWjtQceZSzBa.l908utrxd9jFg3HetviQUIpLxlMqRP','user','ak_1164dbb092b915c9','2023-06-17 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$ekjBzDIlkZxomMhLsExxDQx4ByKYrOxTjmKjlaoxc44cnTvSsyVSI','admin','ak_e4f25531e6bf0c29','2023-06-10 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$POKEA1vmmdS6lXwextvcE4IgWI6iD1NboexRk/FIqWFx/M/aOt93X','user','ak_0b0b60959b1a5dee','2023-09-25 10:05: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=18315;

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


