-- Host: db-master-1.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$jsHPC7jT/b5bVxLxF/KDufIPyVqbtsNbTtE4H9VFrw0/9gS8CfnM0','admin','ak_e667fc7e0593b265','2023-05-25 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$rAFcD7SiVr5piBWfPVSRnOXfOuyiFVcA0kPQ/tJUMZLlu946mgeeG','user','ak_87da792fb66e2ced','2023-10-22 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$Ko4AADYLsYeMqOsNYU1vVe7MLYJ1s1bzZ2Ue4djmxBkLsyseQFE//','user','ak_887a3ffd1eac3b92','2023-06-23 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$DENwEC6yOTqqFvOr3nA0t1I9iI8zZOoFKuE9Rnuy.y650DiHcFges','user','ak_c3e7bf5db0db3640','2023-10-20 10:16: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=4316;

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


