-- Host: db-master-0.internal    Database: analytics


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=40908;

--
-- Dumping data for table `audit_log`
--


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$9t/wnTsWrNlg.CJCSvMEgbl8Mjj.hb6A9dUZNtI6msVatgvCc/HEE','user','ak_7ea342d530798b5d','2023-06-07 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$S.4Lv4rXgMKrtlFJIY6ztUKInhPvV6w8AUHchVA7zsznPp/jjAMiR','user','ak_ede55621cb5e8c7a','2023-05-04 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$l23ZckDx.2OZd9I1JbpiC72Wg42dN0GzpuzMMNLCg4kRSeSlzWB8w','user','ak_56085411619affb4','2023-11-16 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$WvaLcmFmczooeeNEb3SP6xL8rDMoifGJIn3DKmC8qcLtd6ldz21bA','user','ak_a9b3411e81ad7973','2023-10-16 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$SVi.y3IlI.SlrvZISwq/0bVhn7TVK/uY.xRMmhO4W6yiO1J/r5Oft','user','ak_33260aa2e802d80a','2023-01-11 10:11: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=49064;

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


