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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$6m4XjqzIXbD.4odvHUQ0FN2BNMkDYaaTBaMS5a9HS4Y8C5ioOzdM2','user','ak_30d3d4c88ad5a6d9','2023-02-11 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$EfosPypFO01a1ZIQJnz92Z1e6zr2lyN17teapL5JbcWWLD4M9MW6G','user','ak_fdec929f4baac821','2023-03-03 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$He09wCtreRWzoFo4STFMhuyO3p0y2dazJFkXy4BxOogOBq6.TP.WP','admin','ak_bfd7db4c089df66c','2023-04-03 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$hN.uBBHeULDhHdstc38TWP..MrQhRezyxAI9W3BzV0r61VMUXXPrE','user','ak_b1939a6f76a31627','2023-04-10 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$PJZGyYVueiqTILc8poDAcBFjv84TTcr5vOAKylc4wgZICTVysdDpl','admin','ak_a75fa3fa5e06c4ff','2023-02-04 10:19: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=25143;

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


