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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$jIW4c/8F7zW9/qDPRBj6kQQyjPELFqpA9ni5h6q3fdhWKsLosyjVZ','user','ak_f0d0425862b4b4c8','2023-04-14 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$V2tfqaeEX.PPttutMLiLfOM4duDquQwGYM1n92XxmBm8VFeFNbmHx','user','ak_4598eb92925b7f9a','2023-03-18 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$fb/M7Xhc3Vx2GKU7.REndAuvqXeJ05t9SxfrwEzebCGFM5HNdpP6h','user','ak_a6153ddc988aba0c','2023-09-15 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$uGmkxP5.NrcMeN4N8iIIsVj.ghYTUXwWJpJpcDXZp7J/ZOLQHhJYg','user','ak_170b1fec559436e7','2023-11-25 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$EpUWqhBjzuJdA9fEpYvd3Dk1RctF3p/5i.keoRuD1S7jzEb2.8eyP','user','ak_44c008b002fa2d7b','2023-04-16 10:14:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@corp.net','$2b$12$ZUJazIR36Ps8CIQ0Mtkxl0.Mzo0GuzRw5jsu.X4k9G0EQGBODV3VJ','admin','ak_ca6d107f5770eca0','2023-09-23 10:21:00',NULL);

