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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$VXvLajmAtHBFEbfixwNcwIYOkbjMOVxqkeZICjRRrxk7/7rVuCTaj','admin','ak_ab23ac2c45263926','2023-09-10 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$0P6l5piRvY3Auy5e1eLdsCPUuDvusP0OdqnN8dxiGXYzrS.P6jSY8','admin','ak_e3c75e79cf83c12c','2023-04-12 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$D.1vuDZ8lL5pkC1bF5xpMvtOU7QDm9EZRAmPHznKfs8fu9SXudSOG','user','ak_84e56214d55b7479','2023-02-02 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$SjVnWcgVMFmMFY33bf1bssaQAVyHy0pqaR5U85/Jc30yqBwaq9I6Y','user','ak_75dfab9df7469c3f','2023-09-14 10:20: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=9837;

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


