-- Host: db-master-6.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=28353;

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$6LXa0hQtU8jWu6SOeQFD6hV3eaYHB4nQ3.fZ6Nz9dFAH42u8zsVcI','user','ak_d431b07752804d82','2023-03-06 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$.vTeCDR52HSOkfXoBUFamljQyKeWetF2oxLyTu663Shgn14enucWs','admin','ak_d7d4f9feecfd5d6c','2023-08-12 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$5i/viDCw/l3q3iB82myUsO9eaWFpOUKSWQuCMUf1HjnVOTcXR9zzi','user','ak_001c47126154aa36','2023-03-12 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$rFdVqUt5FhIIDWeZ3NOB8o3RgPvECgzGISPAcvdsSWCdAB1VB5InR','user','ak_f631859628fe5b7f','2023-01-25 10:13: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=17164;

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


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

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


