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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$Zs.eauh4p3mN.gA9j50x2o7UAWB4uSGx7RWXxfGsWhHiyX.WIMA5h','user','ak_635b1a5e80e8ea0a','2023-11-04 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$gMHifkuKCjWnfaA9W8WGICXIFWAGbNFVspKBaAKJ143gbUjD5i7rd','user','ak_1167814eb21eb314','2023-01-14 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$Wbb8tvtqbVXc7xLPEIXpFExLy7rwUxj75JTB9MlhkGXB8iRYQyIsm','user','ak_90e605e12b0ede25','2023-07-02 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$nEsvTZxTHAFGR6.Q/gHrT6C8d1j0bseUn4t5/0UQnW8/VY5uv5OsT','user','ak_18bd66626d24ec4b','2023-10-15 10:03:00',NULL);

