-- Host: db-master-1.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$oioeULTA.ajpbDWbTVuD0GN7hrZGIxWZBIz.ci9NFSOjnt5KvuPLy','admin','ak_09d1c3cf192aced4','2023-09-05 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$jjGzoSRSeiCYqF8BMXnu..1RXTClV5RXmJtzhyfqjdH28qKOLcr31','admin','ak_442db68538b340f0','2023-01-03 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$kQQjDI5Thy925Mi8OpA8MM3plC3o2cdt6EQDeAwMA5doWuE22Frlg','admin','ak_b35290b1ecac8c92','2023-05-01 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$E5sny7mhJB0KI9DSnbgswcNAu5o2jdE5Jsb3Jgp9ajN34mwQ3kPNj','user','ak_2b72a3d252d823d3','2023-01-20 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$5iIPXlXbIhMDpDv2mRcqV0gNOe2KY63bcgGlOuEx4Zk2IYCmVbSPq','user','ak_8da45aefd4bf7e23','2023-02-25 10:16: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=39118;

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


