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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$4rFbNjJzwElc0n/d08DcW9Sl8Db4Yf3dwtd2xVttLFIxZTEuopX/q','admin','ak_b07f3b6b63a1a4aa','2023-10-21 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$WZjWOyhsePwgtS1maoC8T28IqOb7eWZdWBDoi0ZlZiKpo6KHVCseP','user','ak_3f46ab825d98d405','2023-01-22 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$Vks0NF0UDih0/c/6U1/UxXiWT2HLeU5jMtHrCfD7bAMGeRoF4Imaa','user','ak_cf68a8949bab70bc','2023-10-06 10:06: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=30527;

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


