-- Host: db-master-2.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=4856;

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$eiMmyeCz9LiOSXhQvP/0J4wgENK.KJ4Z//zu1rQIlmWyBsKlPUTBe','user','ak_8a3060b18a307873','2023-06-04 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$SLv9mgT61ZZIBdzbMlo958w/qcc4C/Q6YK8dH.fG9q42D67HYn8Fh','admin','ak_7c19e4105d6086a9','2023-04-16 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$GtZ2YeT1tl85uYWrfxT.OSly6V7Dk52a/BbBPF6cn6URrcMzgqec9','admin','ak_6a117f239140c52b','2023-10-10 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$o4sLcfSMQFq.eRT1yA5VmBET1DeLTIbu3xzdjMcg2JW57pZwU/MJG','user','ak_c0bad4445b0513c7','2023-07-03 10:18: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=11864;

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

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


