-- Host: db-master-7.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=2434;

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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$bhfFzDNQj4O7bwkPSxiqa3lBby1a4Xqv9k1JHlcam.cQr6fhHBp8z','user','ak_79e138ee81263e5c','2023-06-20 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$4YZSZvVfO9t5zxsq6oppmGNsuMB5qZq/kbpzqdUVjcWdymmo995dw','admin','ak_2bdee230dbead480','2023-09-09 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$vS8Pqd77w/DcCzQb39Y0a7ySFpg6rQp.wVBQl6hiKZpOI.1yK9mmx','user','ak_8a448197d7a21774','2023-01-24 10:06:00',NULL);

