-- Host: db-master-3.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=14004;

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$AB0dJurqiGry4jme/1J4LI6WjKoe5IaRtGQ.yOPFuJ/QHlSWCXvOT','admin','ak_12edabdb1deeb402','2023-06-08 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$aZFaOHxvKQ7kL9r/3RMYtuUzArzorEurZVsVCxWI35UhLy/yzb7Cc','user','ak_012e4722ec570eee','2023-10-14 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$7rvrWMaGxLXFAjubsFxDotf9zs2j3VoHQ1Gf9qzg5NUupwiC5K5Y.','admin','ak_6bb96e2110254e34','2023-03-02 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$ddpGX5XCyE4FauVqBjbTnAAdSoEsr5PlSYV/TeOUG6gDmyibNNyja','user','ak_ffe32afb6e791ea5','2023-10-16 10:16:00',NULL);

