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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$mM3vq/rq3s1MqloHcaC09rMgNe8HpEAQ1lIPJlc.Jg6vfpTrBVyCF','admin','ak_4ce9c0ecc9526ad9','2023-05-09 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$uIWVev7q2eS0KkgO1NynP0rutVTLzpqdspTEY9Juh/dRJu22UcsLq','admin','ak_b2c148f2e1fa81b9','2023-01-01 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$zZb7J0wXvQjrAjWah4c.yvW8Zny447IKGRgD6g2W/6d1NtUwxrr7H','user','ak_85cdded62838c548','2023-12-22 10:19:00',NULL);

