-- Host: db-master-8.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=39608;

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$HCFkRoxPLDAq8TzOpSESHmuTzXe4MpAkdf8Dlv6Hsi8EbABNzRMy6','user','ak_307d0e976e6f4c61','2023-11-23 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$9KDLW5qe/B8g1En7XPqWanv5qBsm2YPSSfPKIv3Ng0AtqMxYWDZH2','user','ak_00663aa03dc6d2d5','2023-08-27 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$uZgNpCLHfKVVrIGtPhbo5XCGefooaD5FTc.fDOofV4Xx/zimgfxl5','user','ak_7dfa83fa858fbc37','2023-06-07 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$nib9MF/qSC4YEcPwsfpmz8ITqDxfFThBI.Tx63o2kTmj.a17HSfYH','user','ak_062f4c5f9a648810','2023-07-05 10:02: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=31470;

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


