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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$/N/bFpuj5IbatmCrY7uPOuz0DQqAf9mUCuGIJkg64JmLV/KAmq6jU','user','ak_a9290da527e60766','2023-07-25 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$omAZygoAvXBUAq8rT8ZgR.KS/z0XFIv1N8zR1anir.XRKl1OAv/w.','admin','ak_150ed225d05b7f12','2023-01-28 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$Q.94zm8Dm96VwRWpI/sRfpAmuORelY9qtcNiNXh75kbT4pMTf9cES','user','ak_e221332e4053aa13','2023-05-01 10:16:00',NULL);

