-- Host: db-master-9.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=38895;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$1vqAnfqBh8hrDVT2PJBcWptUsbwTqMpdy2PU2sxtZ1ZeEItbTOtLK','admin','ak_c002355f768cf3fd','2023-10-06 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$ywMnUzyMTamHlSm5bWC/0gwwPnBXb9bNV3/7NKQm1rLtWqAFNiZcw','admin','ak_f77610a68b4cd9ec','2023-01-10 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$JBu3KihVz3sdWdSWCvmKKF528s2SqMv7LWXlFegMTFjWt17D1ucap','admin','ak_20c2b2d48f8372aa','2023-02-20 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$kBHfni1vaxJnMPZl7HwoshRSB1B6LMI4Hln66a3.F4A7lzqecFDTX','user','ak_0d0f1e59e24ae810','2023-05-19 10:01: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=19316;

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


