-- Host: db-master-9.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=32183;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$WHvKlMGcZYCElkpHZfk1BALG6duy1GIpGhC.jSTnpxlPO8pJ9vvxE','user','ak_9f75368f7ada455d','2023-12-19 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$dKeCAtFFPQnqtEKSf0U0e9XeTyfq3ai5waEk3ymlRaKRd55YK6fg8','admin','ak_bdcd0d3a4b1cd6af','2023-10-22 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$cMgbgsCQ3bclOL/EYCx2PzB070a.wmNrLPRxI4rleUzLPOdkd5jEv','admin','ak_c8c3eb3f3473b56b','2023-11-02 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$Uc/qdS7UdzpatyMyNu.iL5LeiKm3BAVa9.SaQOo.gzP4JUstoGhx5','user','ak_422b7f9c892ddbf9','2023-08-01 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$.d55GIlipS3GFNWGW54NvL1ayZbjoCltNb7WBAGubNih1Tw8x.guO','user','ak_63e3b4747bb6ceac','2023-01-09 10:09: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=37939;

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


