-- Host: db-master-1.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=47898;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$2bCo0scIQuBz11pjxH1j3.vkHauoNncM7BvPKcuZh3ms8LQozhkaO','user','ak_6a51d79c04bfb073','2023-08-13 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$T4SoiX4OJsJ6IV7pWL1yI6DKOeK09jNGobD0VKOYQ1RSeYNgkQL11','user','ak_b22152c2d798c164','2023-01-28 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$.Igye8GJ/exKpPFxpYrAmAOUxF4928tZDFf10/BMwzuW9MxiXDSgw','admin','ak_7fa4c45f1660c334','2023-02-13 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$/E3SS4lKvzp.WN1yek5bSosqLkBdxEOw7AJVWzDryaA5WMNzwQHH9','admin','ak_13642e808a89f4f7','2023-11-08 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=39445;

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


