-- Host: db-master-6.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=36813;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$wh6qm8EXGGFxdqlg0.iK4Xb1faY15M1QKNyxBD87e9OHUcrczPZyp','admin','ak_fabaf738c528a203','2023-10-04 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$rzW3kgCg7ecj3A7qIOZ8G/HsXQjk6SDQYl5rHDA5QSipY2QVgr.YY','admin','ak_6dc37b3ed2f933eb','2023-05-21 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$NghV.BqvY0Q1wEX0xhGAMNYXsYSbaV6BJgslAdc0pi3ygUDGCDV0x','user','ak_79c385380a413ed0','2023-10-17 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$8BKuJPhjPWAnpDxsm7yOjb/DYolLhMxqSqdkyvy1YwslxVLj6W0Rh','admin','ak_3d5e8e9cb0338517','2023-01-04 10:07:00',NULL);

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

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


