-- Host: db-master-0.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$rbDkLR0pm6Q9bzSGH6fTIxKRYTk8oHfDMEnYbL53Wwi.lRczxCWrk','user','ak_508e4fa7e71ba62f','2023-01-14 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$edXG6gTM/FTAp0QFrxDMdbgHEDJu7wjYVoG49vLcvI7Ehp5rapTt9','user','ak_692220ab7e495fd5','2023-05-18 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$YHJ2iEuPxYZnY5lVjYtKXajZabOGCbbunTpd1NOWaaxIIm4Z/4qUs','admin','ak_b01917b12b6a2e96','2023-08-13 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$eHI3rexUezfcFkhVO8c8xdKbHwB59J9K5P1rizw9WIBNG/cGatfXj','user','ak_ab4541e230227ff0','2023-07-07 10:18:00',NULL);

