-- Host: db-master-5.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=44892;

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$mJatQdkLA2DelauLr5TyWTewKlZ8cZIOkX4ZnEmT6nNuonb0i2s6h','user','ak_e3b0793dfac60459','2023-12-21 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$Bnct9sz8.MGKXgByKJ6sD5JBSugXKGbQjWxECAyXdwmr.ERrVgTHN','user','ak_6e6874dda9e76228','2023-09-17 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$pPTtGXEuAUiRrGpFMGtt6BlmcsA6ZBvy0sK8TwQQfKB3RK3G/KQod','user','ak_0d5ea2165cd64953','2023-04-16 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$utohOlstHcsIHo5HmNKoobtKGqsj9gVHaKn02pYR6RbemVfD1OgPJ','user','ak_086eb675fe28a2c5','2023-11-25 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$e17nfxupd7SXl7U6v4X2YCUWw1XDBRK8LTMX4Wh8RghxkQpYjTYb8','admin','ak_06c990aa8689733f','2023-07-18 10:03:00',NULL);

