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

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$U5rVfjHkqBTqBIjPh9gvbXsog.Vc/j9T7sUvu.T.N/2toHbJNFNXJ','user','ak_c58f9d8d55ab2f2e','2023-08-02 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$BwMvjdDeL6YTnHf7Eq4H/QVSXcYYFVVCi33wP9mMECUrQVhamAb5H','user','ak_16c4da36b0866a59','2023-03-03 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$pl4WL5zsokvpkrSWF38gmTTZdD0gtBrqut29gQYcGfH8Ksqlhfhwf','user','ak_b2a73eac805db10e','2023-10-07 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$aFFsjLrKSHr.t9Oh.H0FK5zYXqoxpUgxXwGm4TUMA5SKaozTmjkgn','user','ak_4a3fc25f33f7e581','2023-08-11 10:16:00',NULL);

