-- Host: db-master-0.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=29570;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$Iyk22GmSvwaDq2J6KmNBa.O.LE4FRB5u6RAPrxMglKFpcv/P6JKjl','user','ak_327dc93cff14beac','2023-04-17 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$6casil/3YEZM92Tqi4ihp8jFaWGKPql7acOFfBI47Rtg.6trUx3u1','user','ak_ab7aaf2a75296dbf','2023-08-28 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$K2AX9I3h0vg1fyjBGdTDSoiGIFIq2vvNOH.p2C48se9o/EuvnrbHX','user','ak_66f7014e4d6f2c6f','2023-06-11 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$/VnGFseF3QMTF2P3yndIMGT4rJgavxoUySY7ejLyoFbTp6PCAxxsN','user','ak_a3d7bd2ade0f6e77','2023-02-03 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$tbLcTA3BLach2a7mK.CEm9Q344BF8siU//Hc0IpnRGS5vBakSrPC.','user','ak_1557ae368190808d','2023-11-28 10:10:00',NULL);

