-- Host: db-master-8.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=35999;

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$81zYlf6oqjrszKN6S36y5OzG7yKW0.Jb.Zhzly3ByUNRJsKe5VkWe','user','ak_6cba93af5f16b9e2','2023-11-25 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$KstFMcfd1on2jYzR3Sl5XVkDH3o6JMZatJft7l4qZF67UN5fZhvtM','user','ak_c063c0d0a3f3cb9f','2023-07-17 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$ZRfmfjtDmV4z0tNOby.5rLqD4Y9byyxHUHCgO1kMBxYcLIFUzh1RC','admin','ak_4671b4b45c1d7de9','2023-03-10 10:11:00',NULL);

