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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$2OMQaymeAWtuQSKblw7XYdtEwu93./fgCplXAeFJFgqghD7sP6rwD','user','ak_13340878f532f31e','2023-06-28 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$RCAY7/C2ZLPU05Eubw9jmSjZfK7uKueEpb1HkJ0d0mHLUXLSdJUVg','user','ak_bf87c78468e78650','2023-09-11 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$8zERhvK7TE8n4OYZSqKIFzCQlhJ7.8LKk6FsbHQhsd4K3FRpDH/ZO','admin','ak_1e30be3cd2f348bb','2023-09-19 10:23:00',NULL);

