-- Host: db-master-4.internal    Database: analytics


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=31561;

--
-- Dumping data for table `audit_log`
--


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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$rT9G2zUnohdCI9HH9jfNj8LP77wYdwjx8lZcQGbC2ncxx7rWcA4by','user','ak_a8b1720321f69860','2023-02-10 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$eNAeYb8Oa4X7RV9HWWST70isu4KzMJA6jgAL4XjYhxGXPym4mbYAj','user','ak_f4ab9c2d9ec070fd','2023-08-19 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$EqwcQUVinclawZ7gKunKOfBJHLmtRmvChaVBfskuDDdml9iZXiHW.','user','ak_3d2b657b9e9f326a','2023-01-11 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$RSokwQawzoG/3odQYHKjCdhBGR2selnTorUg4tFMmOHoHvPzRYdt8','user','ak_6b498386e8643750','2023-05-04 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$PejgbeeyY8fKWIxwPBnT0vwQgwCojkjxDYfypN14sElcoBha5FHAs','admin','ak_ea7d096a324051d1','2023-12-18 10:09:00',NULL);

