-- Host: db-master-0.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=22010;

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$4rhD.dZZbcRufNMmhSmT9ONUVoKlV3AAVsFBZTFbYZvY7.L43p7eZ','admin','ak_74d1cd29f05c8a59','2023-10-04 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$.eNO4S7WlMjzQ1LTGgx.5mZoIAsa8SIuI4C5M7XluDDOc7TldEvv.','user','ak_d99d7a405ea52e3e','2023-10-20 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$Ydgz7M0rxQBQ4pZK5ZjQk5y/G6BtWf8MaS/ipZOyXVhP/8ihqRQCn','user','ak_0ab0b3e5a059d574','2023-06-17 10:12: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=17934;

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


