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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$.rHF7gM/48/VRDt7KuVVzFNvgaJHbeaK9n4NxkGPvQMnxBCkwyGzB','user','ak_7170981e1e1f8e5c','2023-11-02 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$Rw/7w.0PORVHQMhttYU/c1XQBIj3gBq2BOt/ocnmj46lkmQ1eIlav','user','ak_22bc2fb15a45a857','2023-02-03 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$UtNOSyr2pGqqrEnChHxGaRO6F9gub07LvytxqdexLoKjlLxrobV.M','user','ak_01d2769d489005c5','2023-12-16 10:11:00',NULL);

