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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$GLBbBxSeD/deRJ2zH2JuLqoM4pXjVh8WxHAoIDx/a2RzcPvtGdBVd','user','ak_470b6832796356be','2023-01-13 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$vL3TtGlf3YQE7d9uxRVz8bsw1D5b5xh02WvP6m6ASZPZD0VreUkH2','admin','ak_c54df4e8cc3971d4','2023-10-18 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$0iBet61RxGV6qpaB4WVkDbg7//QwlahDTqExteenc776gNvIs1W6F','admin','ak_4fb53d0dad1c568c','2023-10-01 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$glKQstWeoc0n1a7.UGS09Ga2i9spXwj63mFrUbbaJgEI0nsVqnzlf','user','ak_866f3dcb141fd820','2023-11-28 10:10:00',NULL);

