-- Host: db-master-4.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=34766;

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$TAF6kNurQEjYpEMpuKX1lOH67NFxgGeSD1xISapzWyVvr5m8yeyfi','user','ak_0e642abdb385cbfd','2023-09-09 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$AD9JRzBEj0rlpX4rqcBdIQ.csHwrjoeWbDoIvDM8CfpCHWZIM1yIL','user','ak_b56716d408c1abb5','2023-03-13 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$/uL20sNuUPGbOWUWprkdEbPglPgykhbUYsU5VzVes158t7HlbUXnC','admin','ak_04245b7ed79f0237','2023-08-07 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$Ac6jPapRhxgTMsg4Df7.Jg4GHXgGKcYFnyvxQtr1QtgvZ1p/5vu1Y','admin','ak_70945fd5d35153f1','2023-06-04 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$w5DtDKcN343.sgVmuXsg6cscUslsqsxK6.xCuC.jfKamS8LcW5Job','admin','ak_9fd9cf37dfba00c9','2023-07-02 10:23: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=24689;

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


