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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$w2qXBFjUPAz8KLW5Q6NTvCaqjqmFosHYcUTp3WDdq/bisNcfOhVq3','user','ak_353f82dcef749d7d','2023-06-10 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$JMxsN1uajmvOhQQZEfPPtHx3mcDOCFuRG7GdEJyA9pEgnaoNDQK80','user','ak_1f9305252e5a1187','2023-05-19 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$M5rDI0rJlINyxwTxsKQrkYm3LCC2TJKOxY7jAO4cr/iNgvd9p/7Y5','admin','ak_a8574cdb91aa346c','2023-06-22 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$KYaIVQvO/AiEO5zlZWJDXyYbxBEf7NYX2ERt7JUx3SX4E1VL1/La3','user','ak_ec645f1f262630aa','2023-01-01 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$kaawos60t1yK5DbQ2czzxGeYa0huntvD64ong5Rainc3IefjB.T3t','user','ak_66d694647c7d9666','2023-03-06 10:11:00',NULL);

