-- Host: db-master-9.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=12387;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$orgT01pXBRIqT4sh4uzWyWg/Xfrl4t0FersH2xFmf.MNkHiX06iA5','admin','ak_5bc40501a064b4a8','2023-03-07 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$EOa93YACiltRGHyVEBwfaiCteaIN6yLW3WXJZEdEWf7RONGMMMvEg','user','ak_b05f639d3f006ef6','2023-09-05 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$Q9XMzZUt3h8jgBzKiLkddIC8A1FxxIpvFowRlUdylENJKbK7U/fvj','user','ak_179913d3ee63cb77','2023-01-17 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$8m1Z77sPwByD343CA22B6O3cjFaw1H/SVcBQruQSQnyQXjRCa5eqT','admin','ak_faa7ff7d4a9d998e','2023-09-08 10:01:00',NULL);

