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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$AnH0MVOXGNu3sGXWyNo078zPfHUXAkZxbKBRWehHYGaIDRJwnHhYV','admin','ak_b1b657a0b4840dff','2023-01-26 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$7TNIzqDXbCG6tnsCnKNcQpQ0THLksLc1.qLC0tddyaOkGJu.eZogq','user','ak_f47c607fede4455e','2023-03-10 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$ICTC/TvkO/GmSS.wNF.x.vse97UGLztYU/jrQoGuTZUDeGTwhbUXA','user','ak_8eb4b64a3c460be5','2023-11-07 10:20:00',NULL);

