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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$CKoglEwkVsSOc1Da9OA/RV0LgZ7B.FC9U/mSSUlaW4jysUSnTTfVD','user','ak_60986485c9e923ad','2023-05-10 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$Hm7rk7yFbcqH24PP8aFrnSm9CacFUWCEo3MVfnJ4tAlucDb5bcS9g','admin','ak_00cf012fa2b2eaa5','2023-08-26 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$smeCay1m9RcYweBrl2Wcl/0AOjQUOijCxQZ2ybXqpM/Ym6bDUWooc','admin','ak_aa80a65cd95c2f24','2023-08-16 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$PyxavTfEM2QYkUH7aQOHnS/rrjeR8M0d2Y4umFSX5f3Ogax/0oiwx','user','ak_4f9f2c20c98a37ea','2023-02-19 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$qE7fx2jXEkURGRwmNteNg51hETx7LQaD6pTGUYIli9LrXpuBFHDwE','user','ak_1841d709a0fb5302','2023-11-25 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$ka6ZI8Vrjq6bchNc56p6xU1rnTPLdl447/J2C3DMKlXVJWME4BFnp','admin','ak_16483834e9d94052','2023-04-01 10:21:00',NULL);

