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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$eYDyKCcPWEc3O/54VZSykoHbg9mXJqnLnIojUeVLYAtZXOTX1JO9M','admin','ak_20ee5dc8556673e0','2023-02-03 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$4czx1DBb4zV6ZeH7k1HxNXtNSWHI1F0s2YJrbaDVHwGnZrUH6l7ak','user','ak_44f92c256b198b09','2023-06-14 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$bFU.1hNQKQvztaSDz71xCFUsRpoiDVzI5vyU.KmwB68DmMZe4tt46','admin','ak_96b5b1e427c26eca','2023-05-18 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$E3sqeJj94fjr2tHe.QhCyV3ErF8KW84GvCIVY5YjqnF7qq6ani4i9','user','ak_6c1785fae7f2ecc5','2023-07-02 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$64PMNC4rqUwfeofWjrHEshwaDRHsHuB7fVdG38Jshg54nIUP/lHbr','admin','ak_2101504347810861','2023-10-11 10:08:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@example.org','$2b$12$jBccWOiMqvYXWyPpNM2ZGpNIIkdKNyUXOHJD/hpDil/cnjcxJleld','user','ak_41ad497636486767','2023-03-09 10:06:00',NULL);
INSERT INTO `users` VALUES (7,'service_account@example.org','$2b$12$x8f0kI7k1UFeMxVIanefhWWP/nr3jtAeyVFj82zsiC6rpc3..8jij','admin','ak_8aa6f18dc2592436','2023-02-25 10:16:00',NULL);

