-- Host: db-master-4.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=22947;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$pd5Xer9bq4pOMeqthzPTP/L8beZ03AYGhnwykJ87aiB5X3iU176rb','user','ak_a43a978609fc35e0','2023-06-17 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$0joCxNayWRHHTpK5ZvdFaibFW2NoIyyqaatYxV7iTDar/ZNwB39RP','user','ak_16b45b972561fb7e','2023-04-19 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$jeULbKK9BiJ9RL9lNUSjShnZEOYr47SXuQsYUWS1DeXFF7keT7Fju','user','ak_85f78b7eca1b430b','2023-06-26 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$M.ErpM70Tj0OYBHnMIkGNz8mAx1fum4uMxQkafTPo0Q4WYh0sS9w7','user','ak_e463a5fd92f8ceba','2023-07-23 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$UOCgMlax7Ox0azk.63uq4FnZf5dFrcpS6MC5qvWDJaXmlTVtwv1dJ','user','ak_4c0ab105562f8adc','2023-12-10 10:03:00',NULL);

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=43118;

--
-- Dumping data for table `orders`
--


