-- Host: db-master-3.internal    Database: ecommerce


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$ZY0XGtWHlZ4786utJcn1PIyAM0S0ZkQrt7DM7vm5IxUCPWnUWUJi5','admin','ak_cb72ad4a8f29900b','2023-11-03 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$rgxuWXJEPCX0nX4xVxHFoq9CySEN0jQ0U4t1C7b6oWMKkxPSlNg6M','user','ak_52ad6d7880e0df5e','2023-02-24 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$qY2DMuh5xh62hWQi.eXJ96Y.ZaGW1E0o.ZkiRBTY6m7.qKn/Q86Eh','user','ak_6812e48ecfaf4596','2023-11-19 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$Yozslzpzg513cljEBotRjdMcQhSoKZ/pqYyytFIRtJPadQbyEEhpn','user','ak_739c3b9f25e6820c','2023-04-13 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$tdUhc3cQiPr4JSc.X6MXz9g6z9HFvz6idy5GZfmMbYfNDiYDhnEzE','user','ak_9418153b3c313a41','2023-01-26 10:09:00',NULL);

