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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$vA5Nhsd.5YvLxz/EHI9eYyRoTb0Stg7bJNDNLZUrShHVJ6AqobFQ2','user','ak_98945200888eddb3','2023-12-13 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$iMMoHDE/4l0oE/pgGThTNYa2b7CWdKxQqfd6o72CcVx6ldDCDtWmD','user','ak_afbb8ab2a04997f6','2023-07-03 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$ZxNsj.b0M04eGrRRZt9s8xRvCl.PooLGSggl2xUn4uzOL5z.PgUvI','user','ak_5dc9c9d5f31e664a','2023-12-09 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$t/fIm0mk8tehODgUn7WIDqZtapocLUpRymkTjbF2nAoOzDHnPFRSF','user','ak_f6ba4f9fbb58bfd5','2023-10-20 10:18:00',NULL);

