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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$PFHbA06ntX/w9Mk7JfTCvn2g8AugYsEE2m2MPzBNNr/KLFpKEsDMn','user','ak_e19038580095846f','2023-12-12 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$KmlovnFF19R1/PlXP9Jkn62cwxmS3uwjCaGQDk4qupxey2OR0irnC','admin','ak_a8e06b8f2922f92f','2023-04-22 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$vbxNIwZ/6nEHM.MCls0iyVW4iPQvDGqaKXAH1KpA4NEvb7gBg7FL9','user','ak_dc0ea304beb157b6','2023-03-11 10:07: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=17867;

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


