-- Host: db-master-0.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=16113;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$4GRCMR/Kl6Rrsg/mLAenBrxezVs16C.6qCKPByvt2y7qzTxxinZt9','user','ak_e580e5d1ddeb9683','2023-07-14 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$3JTcIUbsXgfTe8QaMbPz.TtNMNR4SRbKJx640gta27JCtivsePk5G','admin','ak_649760d15e6ab967','2023-07-07 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$psYMNboVgQp3YVKkvEwswFpkwUyIOna0fPu85BZZrQHmL20dGmzBr','admin','ak_3ae5514feb434072','2023-08-17 10:22:00',NULL);

