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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$HIIetrs8CnSAzUID/MvJ1sQUm2j2LQYZp1pV9UQet.jOANKoibfP5','admin','ak_813557b5cd0bbf32','2023-03-24 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$GbNXTfNlu8TLUP4QFRLs5WxlUFX46McruodAVfx44zu8UMygkMcH2','admin','ak_c6ab57e57556d1d1','2023-10-26 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$B5HWAuKtWeb9apWcnTQnhaxszTdG.UtVw7fHk6C8jngZKeXv.0f90','user','ak_e0f19b8326c5a6c8','2023-12-25 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$zag6Gsnx5I6HUyUhZeDmssTV/AY39Z.FmtZesVtBF/V5c31qKb4nm','user','ak_6a255929028158c4','2023-05-27 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$pOZX7QnbJ14VMlHmARZCC1FuMVuihVUEqcNtwFavvteZW2sNc4T1f','user','ak_58c5d562be2ae4ad','2023-02-07 10:15:00',NULL);

