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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$IZk53STIhpSSFR9clckfkLwe4rKqZBNmTb3lUoCEaTxVugrPK4fQY','user','ak_ef28a21892a8f5cd','2023-04-23 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$9abPCG9iwEDA0cr5ykgDO2OfT07dS2Cv0OIDemv8HiwkjMJE2pwNB','user','ak_7c063cff4959f05c','2023-06-03 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$h22M7T5NLBLO/QRaNSgVEVq.TRiWcHaz9HTvJi5pAP4Yp12PJF24P','admin','ak_e2bbbd71ff7b8a1c','2023-04-17 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$a7QmyjXnT9TMcBiy.IkBLu2uzkD9FlYH6VVbgshqx.jWx73N2Q3it','user','ak_78bf8f9a15b49690','2023-08-21 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$nbEt1Psq8dfY1Truv.mn1EfHw1wdjogo8VplA3O1shpLQtlPtEirY','user','ak_946a8c3569a37f7d','2023-03-22 10:09:00',NULL);

