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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$riwTpW68P6JvDTsuIQn/EE5ZtzBM38qBQSnl.eyBhm2l7FLpnaNQ7','admin','ak_24a24800987797ba','2023-09-19 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$hy3ynMgpl3A2WyYeUA8nZ1FckPn61.IL/Xh5FR.DCPvK.Mut9v5Qm','user','ak_c772a8606eed251a','2023-10-04 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$2uI1Ub1x2DlkqOuE.Rgy62siiVonzZg5yaun/HyNOD9Fps9RetSGu','user','ak_2844229bde4f0ee0','2023-07-06 10:15: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=9285;

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


