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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$lsC16nlt02QcwPzYsvkfM.hFbE1hME1lB3kM/fk2T/XfaTE10VTaT','user','ak_7a29fbd631dfd52a','2023-05-10 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$Ib3hfyOgKGCBG1504OGoZgUKATSu5N0TQQ539mtp.bjpKDWg4Ny9g','user','ak_08940a56b55245f7','2023-10-12 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$ABC.ozzSizx9egiZPdC.mC03d.wasINGbPoyXU1sx010P0O9OP/WK','admin','ak_6ae63391d4b486c5','2023-04-03 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$baxmsK1FhD2BY98R84C69UHs/TZAOgvQ10/riSEwE1xz9gB0m7EEJ','user','ak_359025685968887a','2023-01-23 10:22: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=21147;

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


