-- Host: db-master-2.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=21140;

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$qKy5icjEfGnhK2SNii6YT6x6T9ZvMyG7qADSge16UXFRMvkxRFhwQ','user','ak_c24bb0dacd1a14ed','2023-11-18 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$oz9AoLXpJSj4pplOxDT7tOnd54zUxj42D845286BtNkY3jkyMbsGo','user','ak_237b97380a2d988f','2023-01-04 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$XAs8sCAOM4zLbYG4DFeHQQdIOOHAljTGJ3AzeAylp4ZfRHhYBUezw','admin','ak_2aaa947f75875d92','2023-12-14 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$XobvCp1FoUb5.jSr08yH0OnbGMkLsDUR9KMf8zWxi4UdOvG/kgLW2','admin','ak_d13e52be3b712d37','2023-01-28 10:17: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=24459;

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


