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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=15013;

--
-- Dumping data for table `products`
--


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$u0r9S.GY69MiSxzTOH2MUu0G4M8yJtFVnj7YsBG4xUqRpoCKrGixA','user','ak_2b3dce245d36d3df','2023-03-24 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$4wM07pWIZEjjbeIr09kf6e6H8AC5X6beHe1pnUeIw/ZkdrbTMk.y6','user','ak_374cad015f80f907','2023-08-07 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$Qf2MU8Mhce1LDOAbZBVX2AGxrBKEkW5ijN9UK8AM4XCB5W/lsqZ7V','admin','ak_a637bc49e2607be4','2023-09-12 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$vfjQhy89VBSLpwtgm0M63grPanWybN1GuhYJqyBdw./KEvHLX.NSx','user','ak_0b62393dce2509f0','2023-11-23 10:17:00',NULL);

