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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$QdJWGEtBYXXG4gssmV/CWP7BkgRB8X1V1Lw3PwkrtMTHmn4yYKY2D','admin','ak_8498f0ca6cd9513a','2023-03-03 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$fel6Y.jAnrn15RemDe/L44/gTlFrQ6Q8RfzlAzGVmGGXwpxvncHTI','admin','ak_3144b685082f2dc3','2023-10-26 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$h2kPeCka5W7tzT5fAfKUSlnlwvnErEtI4E2NoBkx3SZY1XdG8JPfK','user','ak_bae2d21ce4a8b50a','2023-03-27 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$FWtbd3mcgr2wThLTHBp85LgmEivrATOL0yuDZrPmMmEMw9E2j6pvj','user','ak_68357585b81c71d3','2023-04-15 10:04:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=7083;

--
-- Dumping data for table `sessions`
--


