-- Host: db-master-4.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=22900;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$hzMHhQ4PZgEZiVE68rCAqujwUoNt9o7aAlp5ROYv7JkI7Ovo6MA6k','user','ak_aef1d7e6f864963d','2023-11-19 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$i7ghD4EDzB96ouN5Ftzhlz8Pfz.rR0LA6KPIuy7wVWrkWjv0uEEIq','admin','ak_114b293dddcff721','2023-07-20 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$uE9H9eFpYUpm4ui63o9WTh39X0KdZRQXBWI1KOgp9GBTsy71Upzwp','user','ak_3c4568a8e973fb2a','2023-10-09 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$7xaaihTdj3VGzi.znv1acG4U38dLoEyEffJnhI8.BiH55EjRMyaAS','user','ak_3e4eb1f02c3080e0','2023-10-21 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$GepW8PAg8bE4ieRe5YZdc0mRIHy8y3ABO8QSycyHvyu/z9eVhvEBz','user','ak_d1bcfc490cbe35e3','2023-04-27 10:06:00',NULL);

