-- Host: db-master-3.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=46538;

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$JZrFf8vjpuiFwX/vQBQmtE7tXimPsKSU5pStRbp13IqoQrFZM98EE','admin','ak_3b9d4739c7bdcf53','2023-10-12 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$kB/3Gu3u/9TcgvTBkDefqDwR75N0FGQvPO.jD/cvlrZWqRu9b6jOM','admin','ak_149c78e6772c563d','2023-10-02 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$2pSwB7W9VLAIyAxuT3KxOmQ5myZ1C0FcResqHZNuBwog2xLLIRm6f','user','ak_10a2cd2e40915c07','2023-02-05 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$jtHEnPIZVEQD8/cpBuhsRjn2a/CfmUQ37Uk.haJ/nUPQ/SKoYQ4FK','user','ak_93da1eafcdb815c6','2023-06-19 10:09:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=46548;

--
-- Dumping data for table `sessions`
--


