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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$zUAA2Ng3p9Kqvj3wCFXZ6QcXHFGsZOR1wXx2M/K3PnmnD9iInMByQ','user','ak_432e13fa9a2405be','2023-05-13 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$c185MK8Suu6ey8cGSDkm0jEzezQ3XR4EY4gziPO19.8izXaeXrCkR','admin','ak_c6f4c9edc9a031a0','2023-02-21 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$TlMkQWDcaIgB8pKEgHLbLAiOykR15bEPXEJjoSmMITJVz43vnwYxj','admin','ak_4b5cf751ac926f0f','2023-06-17 10:01:00',NULL);

