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

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


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$vIOR9X/2mASiSomn.6Ta2SYzxaYqfJL7qTSBrAYMoqMbOt8Qba6VW','user','ak_5c9104ed10d10a7f','2023-03-05 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$WdK/bvfzf55RQqT6WO3csfnlh5mey.mA5twCmkB0Eq6jdLlknd5Zr','user','ak_e7d0de3adaef782c','2023-03-15 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$Lx6FDPWKvT/0BmrfPCFAqmNRAj.VFOgi4rSnKf7KPrvz9TDNGxPHz','admin','ak_442788edd258018b','2023-07-14 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$4CZbDMm.nBPrc.9PFEzl9D6Oun4//q.H/nnbcngofP3aUghnWXe0/','user','ak_b4bf3b2343134dcd','2023-09-27 10:00:00',NULL);

