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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$HWzJydhr6YlQZfDVpA2tt/yKEbde7qtXotmX4xGm8cRuVkTrf23rc','admin','ak_a793a84f00d7b3d7','2023-01-24 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$hAvjP75TZkDdES3yEmBA9rw2BDb7SL5u6ghZAAlmG4.E0zlh.9xmW','admin','ak_3e719ce339cf1cdb','2023-10-07 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$JBUmO57amiR.QCdiAmcJvaHcLDOAaTd5PbTsA0.hU0UmaldNEuybb','admin','ak_b8d5834f76b50225','2023-07-15 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$Fn4hjJnpG8r8oY6A.Ui0Ia2N2k0WnWaPyDH.CeptEGHTpqG2uE8UL','user','ak_d6f950e2a2f430df','2023-06-19 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$rNp2HvO5/pjWRRBovi9eQPOpiAKs5Fkwm/k6yL5iBgSijXMRQm/.E','user','ak_286f702d70621e4c','2023-08-17 10:20:00',NULL);

