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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$i4BcWV8UkuppgzE1OKL5vKJ0pC6EtwYlv4GdoFa./gYpeUzK3cgDb','user','ak_4fccb0d6bab59e74','2023-09-03 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$ijPI0VAFYs0uPfzXdr7.TlMg7YgwcXKj.9x7NH9hgByA7DMvIGF2z','admin','ak_d5b22d83fc9a7b54','2023-12-03 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$.wXl4yEoyHBDEvRM6GWsvJSdvZW3OG5ZzCbVZJ90MpIaoI2xZ5aBc','user','ak_6e22617cc980a8da','2023-12-12 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$N61WEjgED8z7s9OTKEwVyG5Ke6rsHlroWhOidHOvWIbmVLhJolzGN','user','ak_28ee8fbd91bbaf27','2023-07-04 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$Q2ZzUTLhQgT4gVqVp2zj99/VcR41QhJ7Tnlq4g0qroCJ9iSIynP6U','admin','ak_68197a242da59a1c','2023-10-12 10:03:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=23580;

--
-- Dumping data for table `audit_log`
--


