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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$zfC3EKingrnQxpsaV18/Bhpkck/IAPRM4bCi6rJur47IFVDx5W62r','user','ak_3a561565a72b937f','2023-08-03 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$pYHDxhx/xD4BmO.hkGRHVfRxoBZPORqoaZ5b6rFNI7K64k5ML.yt7','admin','ak_d37982cf842699a2','2023-01-18 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$z3MMSJrbi60jgeMkEsHEPpGfuyGEv22.05VqWOQue8Yw0Ve17tRmI','user','ak_cc7627896113b8d1','2023-07-04 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$ipQWXkzctE1n237879i2WNMjmorJWpvYQDnu/0OFe/8DGcOfpZF/T','admin','ak_d0547ff1c510deee','2023-09-22 10:12:00',NULL);

