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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$S56RjxABPuCzqNAVxQsO0zXSVjq/YAFNzoD.03CXqeuW3ZizNtaZn','user','ak_84eb1d89218c7f85','2023-05-07 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$khrv4XTfC9QxE9HurrA3eWmNdwp88YK5c22fUC8TkYbOPeFxnIKYV','admin','ak_3314fc703d2b8bf7','2023-10-19 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$O5cjbG2qrt4uyl.C31FvCPf7IX1af3S1ESwx.QFSaijMFj1V/xMR1','user','ak_2baeafb7e98ed761','2023-09-23 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$GUWINAE87IH5OKUg2cvnxl0MBGLAi6CthVAmay9lUareH2txR4awz','user','ak_529a61fa87afb979','2023-05-19 10:06:00',NULL);

