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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$p4ziTUv7tpkw5.D.Ok43/t9kEtpv4idFa053RG2g0116Y4liq4MGG','admin','ak_0087b74eebd32217','2023-05-22 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$sqDFPtmXAF8uMvUArMN1MB3R/ogkwVQF9D8ERu5TXxjZ3z64n.Sdg','admin','ak_de5e6441927782fc','2023-01-20 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$3QAJjxgXDGgFtZO4WqtsoGCnXBQEU2OnD.AtOjOVtXnvo2giJPUIn','admin','ak_a8fabe79ed99adfd','2023-12-20 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$Hy1nCzwiuxso1V0iLuwaDreL/c4oBbjzAVeEbg89kpgyBkkXWZudK','user','ak_e2a41be6f5ffaabf','2023-02-09 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$mJWbNwlcLivmADUQx7Y4NCeuwDKY0xYSbOPBa2DFFUN5.u9GQS6Gu','admin','ak_0a13c5de1b1f4c55','2023-02-03 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$hMU9vEC43L/IP0EzZWDK10Vtk0SxjkonQMp1fLA2zvjR51JpnQQJF','admin','ak_84d4f1dac42ff0a2','2023-04-13 10:19:00',NULL);

