-- Host: db-master-2.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=35236;

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


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$dTjHYiWE9f8/rZOOAstAENgoR808HFbgqZ0v.kPmQAMD1zEl42qgF','user','ak_db7fec31bf77fcb8','2023-08-06 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$4zccZ7tA5J4LoQGo.xQWWpVJWWW9ZGcRRwC6ZUtuAsGTbeWO785Us','user','ak_4b541a2e39aefa9c','2023-10-08 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$YO0UVTOMMkAcI7seGozpyIoiQO7jEoBeWiqpJXjp63I6YKghz6CdK','user','ak_0d231e44ec1ac939','2023-10-18 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$Dl0tIky5f9OH6HCtEb./UhD10uG9dNE0C4tClGKnLw7kU1uqLmS18','admin','ak_6e121aae37dc4061','2023-05-27 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$sCJTD6bcbt.3QBuf03m9I8aMRmFiMgP.WaHZPOa2cGIlHqUlE160a','user','ak_9081a5eb1cac66fa','2023-04-04 10:09:00',NULL);

