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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$3QQiuxOGvY9iVOx/B7pMCE4Hc0zJlGaA7HRhxAxAE1SLm58fAVDqV','admin','ak_21b25edc69210988','2023-06-15 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$MwchgWDYfI3u5KZwzKmuNk1qHWqYNRJNgTGAxGxMX4bwRwwGBFS7Y','user','ak_ed998c8be2830ea3','2023-08-20 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$sHOF5KoBnAUx7VrdgGMGPCyJwdrKe4eGwJAiakvDGU2sKbFqtykhX','user','ak_bb7023e0fd38300b','2023-08-15 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$2NntZlYXjH9vDYikcetHLjDbz6dyXdc9aBmh7XjwzIFoSdjx1W0Ze','user','ak_584b74c58c778e66','2023-12-17 10:01:00',NULL);

