-- Host: db-master-8.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=12088;

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$BV0fzykHdzsJTkvRgXzB6ej3Biu5cTqLXyn07/18t3DKH/N1JoU7Q','admin','ak_b063be08407eef5d','2023-04-08 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$6xeS6fQMcnN5Y0zT/g75w16W6LzWLF2hEyBEjSvisyfd2INh2Mg1q','admin','ak_7ddd150536258353','2023-11-25 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$aJkSMol1EAxU48TZv4EWF8D4r04N1VmOTVqHov/jEZ0JmF0bjYAsu','admin','ak_55918f7375a18f37','2023-09-04 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$jyRgRu2HaxOaicSSjbQMUpVY4SQL8fljgyjyCvpZ9uvzj77EawgfX','user','ak_ce0438ca174534b9','2023-10-22 10:03: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=13660;

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


