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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$HTChxMgqsUgKS1.gABMV9sEYLYDU0OXH.P9Zhw5.nCcjwu6S2RLMI','admin','ak_86faab873f5471c0','2023-12-18 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$HdAo8PM/OOLEmoNmKhzdVyt1PT4oVJhAYlTtzAodvPN98xJSSPmJp','admin','ak_13d59b3fb15e0b17','2023-11-21 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$dugmwxQ3CcRkOIjXf5JsgenkLqSpMUtwPyhlabfblsKj66WXeLE4x','user','ak_d15072b8da523f80','2023-11-15 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$rCp16/Lw89QUVBa8Ba5sgduJuLxvUkjxr1CQFs2lAD1.itzPsy0Vi','user','ak_88d3201105af44ab','2023-12-18 10:04: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=27747;

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

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


