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


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$rjIOtY/PXZnutquzb74PcDZ1tQxx4F7zD/CihAbUwzAK.ERGnFTms','user','ak_d95b6e4aaeb12d46','2023-06-28 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$o5dqxl/oXt8rfS2s2SV1lbmrw6gkqCt2EytGEbSLDlowrHmhWM.Kf','admin','ak_b81a736cc069c948','2023-05-15 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$.Hm0cRLw9VRSS5NUHwFp3LOF8KfttIK1ewCQmBLqHxq0GFziDjg3w','user','ak_9168f4437af4ab6f','2023-12-12 10:10:00',NULL);

