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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$DuEeopqtONmQopbKzMRkCxLfM7dMbBAs7n50FCuOSs72kEcTcK6pl','user','ak_ef74ce32cec2f933','2023-11-13 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$YzjwINsiXHyZ75WSh02yLhRc3YagnCCrCdS89ClDVLYTk/XIW1RtN','admin','ak_639fab88c79d2c7e','2023-04-04 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$lfkz22yNKESinnSQMQ8fNuZrGsWHHLG2//mhBezFOVn3j0FwMu2zN','user','ak_e46a1e31defc80af','2023-11-03 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$ffU7OUeLIYzRQU2VWpHXj3yMwEpP4Nks17YGN9TyT5CwpR3COO37A','admin','ak_6d9d07c4b644422b','2023-11-27 10:05: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=44198;

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


