-- Host: db-master-9.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=35031;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$LWlv.EWrJ0qe7Fi.E3FJkbL0yuvhMnkXGMgPpohvRf7aiBkaatnI4','admin','ak_ea41dae0318ed832','2023-11-12 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$JXXVYGm3qskpe6JgE2JzXdWIeBtkA7yKpEsxG39.O7MLH7Ji3OZcP','user','ak_2e73ffcdc78913e3','2023-06-16 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$Xep8PMGgAvLWVZ8FeXmJhlF578tDe2sV6CYcBuBzrT9SnwVt.2F9n','user','ak_e9604c297259e665','2023-05-25 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$aHoSd.6odbTIqNUTjptMBAKBXQjV6i3utP98ckjiqMMvb/6V2WnQs','user','ak_bd36be61927b56ac','2023-06-10 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$PAPR4XA4fkCUR5b0dHDnmJgGW3ofZoI52rhNaX4vxeutol48lhVpA','user','ak_199983ffd66253f4','2023-06-03 10:02:00',NULL);

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

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


