-- Host: db-master-8.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=23712;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$LGLr042dHsKm3lfehRBFItAV2C8SRbHpEEgzHrwltLgXPYfdcZo5g','user','ak_23b916938f9d3561','2023-07-03 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$ixeQCTxzz2OokaDGIA0gGdGgZnivORMQd/3NPwMWVQf69/nWnV.kG','user','ak_5f01b0478a114b19','2023-05-12 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$bsCXwLL3llpIiPsi.qz7BQX3v/2HNkLrcGYd5YX/dc91XVALGg0GU','user','ak_74b07f3913b29e1b','2023-05-27 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$kfJwXjreawxRBmRpdNdjAN5XIEUjsoHB78TF.vbxXOW6q2.pifV.5','admin','ak_25a13b13bd138162','2023-08-27 10:01:00',NULL);

