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


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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$L07xLHoiKKFxy4nf4ePtJFh3WLMf0vgMXjRjG5gAJsFL7uLqOlBbs','user','ak_8c9937c423fda9e6','2023-02-04 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$VvdYBn9ao3rLybgN5WhqvUZpt1bwg2s/kjFvtoucWbsiE1eWj.xVT','user','ak_b977244f631b946e','2023-04-08 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$QxI.HPSrRnNSdeOqkFdG9ra8Ybpvv6OqI9BqgeYCLo9voidD6zi2/','admin','ak_32051f74322220c0','2023-08-12 10:09: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=11973;

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


