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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$WxXy7oJqlt2SHh77h0jwFMqneR4CD4.CYQ6uyL05sbQGHMI6gMIFM','admin','ak_2b7bbcb75434dd3b','2023-06-03 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$Jn9sk9fHtaqaZvgEdvXK0N.diweP4Qrs7kB5d2GTAJ.kzIH2eYfP0','user','ak_f14e4aaedfc0c7b9','2023-02-09 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$kfeXsUpv0L0BPtyIYSFrbuB/iSaOywjdqIC9kSonI1qWAcJP7zbxd','user','ak_823fdd724559bb2f','2023-05-08 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$hnwd9PRoLvZNUAbp/T5bID7UBSO9J0jomY8eU2aE2CzScADbQqx2b','admin','ak_67a0ed7da5ce1961','2023-08-27 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$G3lpL1J3eGrE3RN44Uf9Lp3bNS78zeuuTUn.NTy46srW91nRaoS4S','user','ak_ecb9312fd9e23d30','2023-09-15 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=23106;

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


