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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$Aa4aUExq1V6kCpkrjKnDdjDCuEvoj.RzQgA17IDHEwc3maNeHghLQ','admin','ak_750b97c1d792affe','2023-10-23 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$qfx1dKe59VSfB.AwemT1UvG6bPF0FL2qWxpBCAgMjuoevKZRI9kg2','admin','ak_f120c981fd58cd66','2023-01-03 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$4o4TjxwWwapbBpz4DDJr/xVO.S9JMOWfOfm5JKpjJ2ww7TZEH0pqI','user','ak_78f7a9ab2966f3af','2023-01-11 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$GF/dcl8BghsxF9caGsivTL2qkXrqEEcRqnGabGrWsNxSRSlLYoEyr','admin','ak_d9ff48217b62cbe2','2023-06-11 10:10:00',NULL);

