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

--
-- Dumping data for table `products`
--


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=41170;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$ZvR.ODlYV5lplP8qjiVYRWsKCb4qtDO7OlV8vkXVjYKZqmz.wXRuB','user','ak_524a68b4b1fa6e36','2023-01-07 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$4hueWwhQBl5M89Lz2U0p3dH2oolOGHHGBabQUqRQXEMmp69/p6sZz','admin','ak_76fc082c5a7699fd','2023-02-16 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$aJrRrwayuGjWAwCc8PzFu/2udpx11sqib34JWj91QCwpzto0Y5W/o','user','ak_51f9b057aa2d084e','2023-12-04 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$S0D7GJiduWU2ndYMOoO6T5bjalW0DPUu6O54sd.qNfGxTSQlN4pcU','admin','ak_fd243ea02dffa8df','2023-01-02 10:11:00',NULL);

