-- Host: db-master-9.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=38201;

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$SZoro8yvBqyi5CxrWtS69B2p539ueXj93rzxZCJyygr7lnER0Lbe6','admin','ak_6c5c92536f2adf42','2023-08-24 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$EFW1au/g3X0zFT.ywm2oWkLGLhU30N6eaxcJCwtXUuGiUesPiQDuV','user','ak_169c831997bba12e','2023-09-21 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$TjFQAp0s/WIgdBhOqNcyU4H7KUA1CuPbMYRbP6UvhlwPPfCjitkCa','user','ak_3e5278e1958972fd','2023-09-19 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$NbIvKMMSS7Ir9BQJot9kdAm.PlIrsD7XE9zcf6Sw2FARDdbLgxYap','user','ak_ab2d15348f2aa2d5','2023-08-06 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$E9iAPwqEqs3g8EKJgeV7PRy.eI1HnbQcedAc4Vssz0MqgqXERWu2h','user','ak_620cb6093c8e9b84','2023-02-14 10:06:00',NULL);

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

--
-- Dumping data for table `sessions`
--


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

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


