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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$MN9MLGOkSv7HnKM1kcnEDJdFbTrreGP5jCSAO0TrIgIiKJu0573IW','user','ak_bf670e9ee8a15a2e','2023-05-11 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$fmYxOfYQg0JRQ/7zXnlnLX2MsvEGt.IBVDyxfqdLo0VL.3vppsRip','admin','ak_6047f0d7d2b4eb3c','2023-10-02 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$iAsNlkYMfpofBbOUpq79v69BoI/1RKZ7lt2qq4.TdM2.PREaUcaza','user','ak_2b8bf7cb931a2f56','2023-06-08 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$hsXOGEgIqeZVqYzfCS7/IfLAOulb8ByTBSlPEynRWVfcZldBZladz','user','ak_038f9e30c089d449','2023-12-01 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$mzePhnaeM9pYm5rffktGt1.BJFEOkbRXv7LtEhzgXH2nhLugEM6MH','user','ak_962ea22887998574','2023-04-22 10:09:00',NULL);

