-- Host: db-master-9.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=1638;

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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$cbTkqpbRtWCflE/bNCx9g2Eb.lztC8lHMWRtWoGXwJe0mIBKwVaSC','user','ak_9de6a0f1e9725053','2023-02-22 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$xgjlOReDCReb74jeZhXlC8l8LVmNZPxa9GqTG/mbN24/1JBVmyTxP','admin','ak_9ed6de4966f1baa2','2023-10-28 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$xaQkDYLtRcAFwIAwAW2cP6GWgCDcHFfQTFHAprHFnJdkZbBG99yOx','user','ak_c13fa135f12e6fd1','2023-06-05 10:14:00',NULL);

