-- Host: db-master-5.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=21046;

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$qjawZZYhUfw8u8NqBbOh/pnIVnvOZ58K587QW9UOOEFrcLHrZMddw','user','ak_ea6e5d81dc6bfac1','2023-09-01 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$5C355QQJk4ESmvKD18kEEBUeMbEwcIki2uD2uAu9Nv5nWzeBtp7/R','admin','ak_b2e76a8fb9afe253','2023-07-08 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$bjX02l4v.EUiDuD4l4/.zmElBzoE5JAHYpwNHOWJd4KJCfKQuix1O','user','ak_e08d2a116616f5e3','2023-06-25 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$jQw6AF/GbpYmI3U2RrX9XEkKS5tlHS01TYZ1Z36BqarCpi.o8scDz','user','ak_1c0d325a5259168d','2023-01-06 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=26249;

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


