-- Host: db-master-4.internal    Database: ecommerce


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$GtyZfhzr2ZFnDWFzsWbXd1g.mFGRYOnWOHeYggE7frnh68kSE82Oq','admin','ak_c4be811da7a184ca','2023-01-17 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$kD2FAOCFpJXS5INl37B/3lTrBuXMAAuherS.H8JVFOtpg9E3dzZUh','user','ak_41cf3f4c3c215281','2023-08-06 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$Up4NQkoZRLCCAMxwdcUNv6Of7WJmkvHjbcHBpa4czvySz5g6MXQzi','admin','ak_1ab2b8e745b8f772','2023-04-10 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$YuNCby8i2ofeg0BCRWK.4uerR2baHs3D8wrVzfPev.qOHYjHTPDCB','user','ak_74a92725f34fbf18','2023-10-06 10:16:00',NULL);

