-- Host: db-master-2.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=14204;

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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$TuUeiyHK80bz/aJgplFRS2oCu4iUlW/Ne013rSwJ1mVkKRu5HII1z','user','ak_b00c3f9748cfc2ad','2023-09-11 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$ChSWm/mWCpRCmvo2fMj0MW5OO5jwVFMiRbGV4CdnfgJVLfrX/L.RA','admin','ak_e1fa653c1de37cd5','2023-10-28 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$Ka8I/yxQJ0D9CbY335t.16QOxomTg08SrniBd7Ex88Xd911n6AkiJ','user','ak_3ac31de09ff94ade','2023-03-24 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$e1jxwKI6M/E0GTey2SghB3Daw6KNzNZP/mamCMHsOqLCMdk0/bvbP','user','ak_84554c0b17ca6532','2023-05-06 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$PXoAqBP53JuGXIrv6YGQyGMdncSP5cAinv6qYPXLwV2wjycfBTju5','admin','ak_3087aca01fd27efb','2023-03-24 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'admin@example.org','$2b$12$/NxtEhxJZGWk0azOofBboOz6VngqCk3K4FpPlVt/mJrjMSgz9GP7C','admin','ak_ab097f31d27318ab','2023-02-05 10:22:00',NULL);

