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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$JEokHGkMR1Lc7zioXAC0sm3uSf0/iqy3kJJ8yXQvgpylMOVk/Tg2G','admin','ak_509b3328f1a62d82','2023-09-08 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$o0Edv2pq1QHvY5vOC2Bm.FrbPY1RZ557veIPeUKRP/JKdC9VkB4pj','user','ak_763ce02f0ce2cfb9','2023-04-12 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$EQl9GmsgjBMcYZNvXYt3J.mVOvIwG6Q7xbEcBzFij/iE7KyDcqtQP','user','ak_f1971b107d324ce4','2023-08-09 10:05:00',NULL);

