-- Host: db-master-3.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=27263;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$ql83H7mJMJyHezsgt6w89rG4gW7flod8dysRGW2nFQ1YwBXe1wGJV','user','ak_ea5f63d7885cf548','2023-11-08 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$P6yxoj810LWdtIGix5oV8EZQWeqJsqJnavLn4mC1Ibp1/r1zJhDGt','user','ak_0f06750ae40e9825','2023-03-08 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$oW1hBajg5Ced0ssQXK/Ru7glivR0.O/In8Whe3SixtQ5OYP9BYSXx','user','ak_fad44bec1566464c','2023-08-04 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$nkLpDsj0mv4ket7VmnEGjf7ZEkdMh9o8uBGRGiZfWUu.R2tEY8Cb5','user','ak_25df4e329e85b89c','2023-06-16 10:12: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=44429;

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


