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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$Ef0jutkPuhm0Jz7Cv2DIDaqBBgUNhh5blnRpaogdt/kWzhPswVHLh','user','ak_75e4f3c0254eb910','2023-07-25 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$pOIOusoNcyxNqvXaR3xxGfhsFJ26Kikve.BfwEFf/kJEe561gqATL','user','ak_89cf313374889e11','2023-02-23 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$qnyyBNnIPbDd5PLXna5UMzV9/KKHUXAAS3ZOahy3EbJnYmQKII.gJ','user','ak_7289c0097b18d9ff','2023-10-08 10:12:00',NULL);

