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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=36223;

--
-- Dumping data for table `audit_log`
--


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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$PPdPcebqTYa62bwjPXnQwnIt13a60spUuuJ.sVE8C8Exw438ejrzi','user','ak_c4eddbea81a5d7d1','2023-09-20 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$T6WddKXBLrTDFETzR7.w/QRfMgpoP.NucdVLBShme0f7MorJqU1kh','user','ak_4eb133e7b4cb7292','2023-07-11 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$xTDnR4yfzu1X4xN0/8k8pLOKSCFklzIvhBYQOe6RAg3M3gOUj7256','user','ak_630f6e3c976044cb','2023-02-03 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$pUYqjiQjvMcTRyomTgVRCyK.GF8U2pDxFjJQWkzTCfQaBz32bAHAH','user','ak_4de97f8da239dd0d','2023-05-21 10:04:00',NULL);

