-- Host: db-master-5.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=21121;

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$oa.JyAD1EwS6c3ntZ9VZiMMWFpGXP/ynR2QvHa/BnYNzgwuPsyrY2','user','ak_b9577e770121a9f1','2023-08-27 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$cHjzAoyhSMtxey2wlnayW3BoAnw36RQvJrvZiRXYZXDZ4BQ0/XXrk','admin','ak_6241d075127ba4eb','2023-09-20 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$Y6oAstsk1nW8iL.G3ctacyKznP5U4PHTH7wyr7HU4zi6aU/XrXXn1','user','ak_760ef6d12de29b47','2023-08-17 10:16: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=17432;

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


