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


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

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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$f6xAWUrGjUJLuzGUOe2XmHBa6W/CfHbhJ8N0UlPhcume.uqsgMZXd','user','ak_3d68d911fb7401e6','2023-12-09 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$GnrYMltVEuGWzlzm7ssUkRaZy0sls38qhq3xSgncHr9ma1ed7Et/A','admin','ak_cf2539c1d3d4ecb5','2023-01-16 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$2UkF0/YiyQvZjzKQrB8SXsnHQ/WLxSDKvUxTSQ09Y0JSR1amu1GbK','user','ak_f4321ea62cdc2a6f','2023-02-23 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$o3Fuaa.I4RNRCsnCFJPoBUjdgBZ.KF2SB7WpADIRCtiqskyNj5daO','user','ak_355933a450eb9d9e','2023-02-06 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$7JHDG6zRz385SezhalDUj6EhpRgooGpjAsBBLf/lM4gFSJmlRTI1W','user','ak_1979a2a2f47b7097','2023-09-24 10:20:00',NULL);

