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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$gr0a.ARb3bqkUSUdpDTLowk9ZPq3lpBKnjpDyo6Wny8t58Hhtdn1b','user','ak_3e07c934f1e3c54c','2023-09-27 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$bKz1Z9X9v.2b0hgUWQ5d5G7vjLSiwtkbc/nYHIeTVbcGnqQI4moIK','user','ak_82af0cae64f9527b','2023-01-13 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$ZohBfbC4cfIQAiXH1voRbOjhbbUvQBTOKuxMlwcK42w8iwtRDq8Uq','user','ak_4dfe599f36467c9a','2023-11-20 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$S5EkVIXrFeHUVNWUBGkFjGzp0vaY5bQ8VznsFyGeJXX0ULlLUcqqr','user','ak_43cb145c75671e4f','2023-04-23 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$VMZ2TQ6MNDjCO8iFf4jFY/tHX1DPCJBrULk4g8PrmH1.rhm40fN25','user','ak_9dcb5b7c495391b0','2023-10-06 10:00: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=38321;

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


