-- Host: db-master-4.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=35297;

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$6JjUG2H0zIyQ8bWmVVWJtdufFIUnQ.73x4UHPGuqKpwfGl82reFJM','user','ak_bd61ddd0ff412ca9','2023-02-14 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$jGRR91E/T5tsaykXjvuiJ6/1GRSf6wiYHA6oG7UJXoz72YWzvMmds','admin','ak_831741c8cecfde33','2023-06-25 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$EUzIU9rVNbpuHNUcivXe9I75Xmx7cwjdPaE7LRy7Y2p6fZPdew6vu','user','ak_913e28e2895f0b2d','2023-01-20 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$FqLi7CzJ69aY/QYPXmfEiIh5SIsRsRuk6K5othX3tiz36QYUXBoz0','user','ak_a976cdc9add34a4d','2023-07-04 10:10:00',NULL);

