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


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$EvWtYLxJubJbxWXznKoVvmfCqMdPC4mLHJ9LipjyQ6WebR1a6LYhA','user','ak_6cca9085a148b367','2023-12-02 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$pCPfO5l02f9CsCuFZfUpzdTz6VGHz04q.PG.C3pJaV/GXl5FzpIOL','user','ak_076a31c45ad6c8ae','2023-06-28 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$Wv.5FiTyaAZZSQ8sIHReFY01XXBA6ntG1TIzocmC0NcSdwTEFbGGk','user','ak_27ea53d2ca2082ec','2023-10-02 10:01: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=47637;

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


