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

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$U3W29hsG9PXXITtE/mO/WsaQT323ZHbVQ3bhATI61tX7ZBZtdKpFG','admin','ak_13715bf7aa1ddc69','2023-08-14 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$umJdwYnbiWg/wr2rOWbY2piStDzwgjgpw7hL5ZSnfXgCqVjxTC0mS','user','ak_8d69243689f0f1df','2023-02-08 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$od/icxFhyydkcKbpqlsKcyZJgvuBYehp2ZXvBZFCMrXUi2JdPNBRS','user','ak_f34f7ce96aca7357','2023-07-23 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$6lVn9YSn92aJdRHFGVt/jP0jzescxL5ENk2vzuuglqYno5rKqiW4K','user','ak_e279be612ac69580','2023-11-18 10:10:00',NULL);

