-- Host: db-master-7.internal    Database: ecommerce


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

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$nOwrmJDH.PyLGEUeqfJPLNSNN18jvR0Fh3xbaNsz9gWaJiHaZwRJM','admin','ak_a860821e8c33eb6e','2023-12-16 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$UtyURMOpkT6d/zsm4xIWisj./jN7MKZpT19H3kQx/xI7VqXxot4nI','admin','ak_72b84358c3d472ce','2023-02-10 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$G4vVRHPwZ.Zle.guA.FBeP/6oI6nf1JnrlMrS9wtw7DS20jVUnNWy','user','ak_79d47a8fdabdf4d8','2023-12-17 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$DpQR/XtqLucX7vKaw/7QTXQ9eOZC92pJtyHMP4.Q3QWmXcDXadyY5','user','ak_37e69fb1e4ef818f','2023-12-15 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$W70T9MiDqTAeLLVS1uKcBTrMitlmZBBCDw.6t8krFdbUsal/zVPby','user','ak_2215cbaa6f2d46e0','2023-01-24 10:03:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$wKM9dg0kAPfJv4ds.4iRgPL24k0N77AE8bVHf7AppVfiIX49XfGUV','user','ak_5a7431eed55836bc','2023-08-16 10:07:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=11856;

--
-- Dumping data for table `products`
--


