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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$TEOx1F2p6ZE3nlFrH42pJQCg3TZvbML8ubWQJC0KTYKRs1FUSQqeG','admin','ak_d6eb817334961de7','2023-12-12 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$5Njwb.jFWlRSXs/2JhHmx7ksMV03hWYHwwlt9Ue.E/HKrLztwz5gX','admin','ak_bf9a4c15d8df9b58','2023-08-15 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$NrgXoXTvM0E4RRP.wDTs3abzZjv0iwIGXcFLA6Mx432Gpq/Ny/Y6s','user','ak_a1c65f0400b21345','2023-02-28 10:09:00',NULL);

