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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$jL2.jH0qh6wR6mDgjRNaFDm4um33ENrQKH2H0z9SUtTUVtVedf0HK','user','ak_882f5ccc2424dc5a','2023-08-08 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$WI.7loy18Oq86afztrZVWYTDXgcAlwHtn8k0NaF2yNzHXw4fvlMSR','user','ak_26e18a7a80502770','2023-11-13 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$ghdIvVOM7guov07f/vp318PR4wJSebu5YPR.VEkX5y3uCsOWqt7o6','admin','ak_f91e7093b0b639f7','2023-12-21 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$ejMPfC/lwyAppYlPMTC/4dOAatGI5WerRxoOr9YrBfdocaXJfg6j0','user','ak_abd9dec3310525bd','2023-02-12 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$a26CE3BxkG4wnWVT61VoxmvaQMfAiF9c7e74ObV3aDVhQDD.oz/0m','admin','ak_1ef7d037101fc99a','2023-04-02 10:02:00',NULL);

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

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


