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

--
-- Dumping data for table `audit_log`
--


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

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$VRLEhTQHhvAdDCm6GQmCnVq3hZ9e96u.ZFGTC4Yf8gIRMSq6hlYPK','admin','ak_fad5ab36e74b4dde','2023-02-05 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$A57PFffqfPUjRM8GXkprpwVjQZ9C8ES0hRzgpDUL5FRjxU6wzg3s2','user','ak_c0035c78d9f17fd7','2023-06-02 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$K5hZ4GTbUCLjVz761k1ZtsMTewzZzh8bBJc3yEa5IQHrqcTk0pEhJ','user','ak_d6e46da79709f37a','2023-07-27 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$s1ZQmOl2zuHOcrYReQXFLO28gc310w626hUVFEIClquxITsRz3InC','user','ak_57c4eb20d51b1434','2023-04-08 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$cvmg8IC8eD3hpx4L9H/vg2s6Bx7j8T0FuH6Q3vCL4Yuz7XGk3Jsnb','user','ak_a3216a6402a3d8c5','2023-04-06 10:12:00',NULL);

