-- Host: db-master-0.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=14933;

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$TjeZDkQdyIAwCJ/suuOHyMnfhYmkKOTM5hgLsspKxiS2uOiQj0YXV','user','ak_cf0930b2d91e3401','2023-02-06 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$poXHdc7Ht97WDV7nWVAP.oQnGlFz.HZ5QraIeZxsbglbRJPpdd5jq','user','ak_617a1f198dce03ca','2023-09-08 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$uH9lovz4esBmLlYXDIpWN0hmzEMxdCVUt7Sh2DlEFx0bk84zfjw0v','user','ak_0ef8fa6c46aa18ea','2023-03-21 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$KJWBTblkExKV9yV2xVyJW8Vf/EfX50/V8ya9qgkrUIKoiPXE13U3I','admin','ak_0a2a3040aed4b3dc','2023-05-19 10:14: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=36619;

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


