-- Host: db-master-2.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=18540;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$33VaabFeUpKJjhGR8r5TXic92vOOjlP44czhc9dJG1jnyu1eEkWC4','admin','ak_98b55524fe13f270','2023-10-08 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$vBtHooT/pBQ2rTLDkczgArjivVjSUjXlHzZOfCUFKLwfPKbMnhPsD','user','ak_9758d4029a7a476e','2023-11-12 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$xaaFcZgzIA7S.SQeFQoJMFRjFnJRTpuwhvzFzDa.hmIqKbyWAUFuN','user','ak_ae67e75b55172cbe','2023-09-27 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$Ph.6KzPVxZME4r93xeH77wXNA8gFcamYcJBrSL/tpUUinzUP1F824','user','ak_532394f3a2b55c81','2023-07-18 10:00:00',NULL);

