-- Host: db-master-0.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=21873;

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


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$9ZmAm5bDdJvtc94cV8Dg1y6GmrPRvWPThcC3R97x.nAB6aPoIlXid','user','ak_605aa8e095f3b797','2023-06-08 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$nGKt/Z7N8stNyx0ngjkhM5OHPsXIdonXm0mpCDA81lNCII0jCR3.D','user','ak_075973a9f1995e74','2023-03-01 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$XXoP6DhM6eCxFRTSezuB3QxiB.nv8a3xk99ntbhs/nmcy/h3uwaBT','user','ak_8a99d5839009925d','2023-03-03 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$1D9ldzLrayKjyiKMiyPRoknvFbNq7fMpW1K2QQZ1/tXNWYfN5ybEm','user','ak_82882339e8ebaa96','2023-06-28 10:07:00',NULL);

