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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$SxdFeD/YtDdgOpYEIaJqdA2hck.UELamK0njLKL/cVAM3xqPZbjqu','admin','ak_6b8cac0c90090ef3','2023-09-18 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$KFcK5z3iubrDwedXAzbKHfjSutkvOJVf1LkcBzvCuOCJmVP7xCUSY','user','ak_fdb02ce5191f6202','2023-08-17 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$Fc/lRd4qtefFw24aP/.SuuszSx/cj4DQeS3M0aLdH61eTLPdpDCIP','user','ak_9d337cd2e9f3c45a','2023-05-16 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$Ehg.lcZLHglvipivfTQ9Iw3.5LSHAUJlRWHBbiRGdvioU4Xzoa1v1','admin','ak_980b4d6e02f85bc5','2023-03-04 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$y8MYpBAghWFwvacdpMYcYZ2ezENiDOZkAmIYMDIu85v5awMCs2mSx','user','ak_07ce5dac38bf4e31','2023-03-16 10:22: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=15394;

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


