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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$4StZf1oMJqC1Ni13.5VdjxsrFSE4KpyaS8YdGy0IBbUrVY8EBbM8j','admin','ak_70e80a73fa3c8f95','2023-07-23 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$qFrhREj.t3cP5YYb2ugYVjTk6/9NhhykeTy6DKkZ9MgPJHIqpNV01','user','ak_24102f87c14ad2bb','2023-07-26 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$TYpBoEh8pl9r1Tm0rpUq4fJBS8dT994w6TvdTfD9tvrZPCUqClRwY','user','ak_8c6a0bf37a8999b3','2023-02-16 10:23:00',NULL);

