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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$uBzIF1bZjPc9eWkrbZp/y3Pah6ITljMyCvVeR7Y4YyqDJSdjy6H5r','user','ak_bd0609995cb94b1b','2023-10-18 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$pOXaNcQroDwswcK6mssAg4ha0qg3J.7KwgvlIX7HyZazl2mZ3xr1F','user','ak_48e68467b744ef4c','2023-05-20 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$JsORRzongNHUk9wpQKrszNqgv/EOXp6CfcofOrCG0qxZCRQKipxnS','user','ak_f65fb564ed5e1a80','2023-09-11 10:11:00',NULL);

