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

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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$Yl/PVMqsL6uZEYZe7j1GWEGVAfC9vWntoyhpIL5h7zvy8A7Qkqpkx','user','ak_6884372ecd3a93fe','2023-08-01 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$NpgvnFF2xzHENY1YDUfMld.gXre3dZf1WhNk0E4zkMOqRkCtb3MB0','user','ak_d9e2a391dff5c541','2023-12-25 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$OZshy7ewDSk9LmuDfVK3Dhg8Ca2CdveyRV1K00Adh3J4PBXQQOSs1','user','ak_6411dc460144791f','2023-10-02 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$dVjQgHJ9luUkt8Np8kCBiccGqrzpbCFEJ2ah4fTwtZQqs8/7RrtaR','admin','ak_f12122bed9266ec2','2023-01-08 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$drqW.HMIaMesuTfkfkRwnyAi/1jdGwhqXuJnAUYLTXX9BXZLVtyxF','admin','ak_bb05364377422410','2023-08-25 10:02:00',NULL);

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

--
-- Dumping data for table `sessions`
--


