-- Host: db-master-0.internal    Database: analytics


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=29727;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$rMDAe3Xxjtkuo6yCm53B0/NKyTLndud0Jc019iIBHmU7tDv0FsNNW','user','ak_7f9ab53e468b01a1','2023-12-28 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$y74zNIJkwznlu9DzLaMKOUlOKgK1.XlQc/KUqC13StLEarziIECG0','user','ak_cd527ff49204bccb','2023-10-24 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$MG1nBADaLPF5YhfcsKJppxdpxvVL8LR4.t0PAp7cvCK0dcpkqic8.','user','ak_48414349c7b97f37','2023-01-28 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$SPAKmxGMhjTPF0E5tbu5tev0M2jrYI15xYvskx0mvIKOGQ1CfnnGW','admin','ak_7606ef369f369f80','2023-11-22 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$v5QJF/MUIE/q/cS5Xb7VHc/gc/aK/DRwGxYfWmtAAkEWITJunIRlE','user','ak_a47038ebd9219c75','2023-01-13 10:08:00',NULL);

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

--
-- Dumping data for table `audit_log`
--


