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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$94ph0EvHrd83fcNNwem.9yJAqEcKGykd/T6hWVWCZETO62SCeMkhy','admin','ak_b5fb4ea508a3c7ad','2023-02-27 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$Ks8x9cKNNKBPwdkCeK9Foambzt6qPh2.hujQzLuclrbUnsM.T3JLW','user','ak_167c52eb58816239','2023-03-18 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$wJSmKVPf8kg8QV/CP4/ub9aN8N6xuJryX/JuQRuUrxMUVfWEi8YTK','user','ak_e06d238406b046fb','2023-11-08 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$rd4r3.AJE/7jXxo.c7B/e3ZxBN4oEOHxqt4M.bNcnWgLdA8.BBiOU','user','ak_d8bd971996c12934','2023-04-14 10:05:00',NULL);

