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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$aDdpAjhT29ZOB/NG93eslz7SUYaq053SrL9CPs8Gl9vKKgUB9skN3','user','ak_c986418a3100450f','2023-05-22 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$72i7DDB0FMe7QEC8UBsePm6jplPmaJXJ7hcI/C0HUHC9JOvVrrdo5','admin','ak_409acf791aea7b6c','2023-07-24 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$S2gJlV/4hH2ShhJy76CoXPoijfu5lABVCPt3fz0OjX97PGvuADzLB','user','ak_87c57bd4f34961fc','2023-07-26 10:02:00',NULL);

