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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$hbdjHRzwOl9Uyx4oJ5Z5dCJyZ5vXsQGRkoUUORXppp04O5y.2aaOq','user','ak_25175729d1ea6020','2023-11-22 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$Zglc1UvKJkxaQEygMmYLrlQM4z4crEDVQLz9Sp8CUztk2phyWqWcz','user','ak_234c5f7a66c2ecc1','2023-04-23 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$28qsDXc.9OEcmEA9DOhc6QKG11cvH.AErfAbCJ7CUnqsSTRtx.j4z','user','ak_e16b8e79c2940587','2023-02-17 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$WbnkojV6tZnTQRnWX1kWFW0evfjUIJEWPJT6WIQ6H8blud.1a8jpI','user','ak_460a3ddea96e375d','2023-03-09 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$oJFbyXoyecc8vGFyioiqwT0s5siohJAYHTVp5g1ACgxocpi5hECm5','admin','ak_9713bda91fd9b90e','2023-11-28 10:17:00',NULL);

