-- Host: db-master-4.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=41884;

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$5degq6dMPnSTWmtOzITsJUWaKNY44daSSUoI1.0F24/zcBiDVIHpl','user','ak_07b79a2976a20906','2023-07-22 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$.t7v1e/RrITzSBf.V7KDitMOzfbsrYjAMS8uUmMcxQ1fVS7XcCrV/','user','ak_618ede9fa82c483f','2023-09-08 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$GV5PL35xzdpIk5kZJl53mI69n95O5lpRSDhDjkPssGR8Q7ZiQ.bKT','admin','ak_d7d9b0cff9119d27','2023-08-14 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$8e316fack5hCKWs2WqSt5jgAorJcqkSC/TDSrxkbNzgOnwnH3AE4E','user','ak_caeb720fe0b36854','2023-03-16 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$GM8sEpHoiAB2ImErX1Qfc9Cfsf2FmmWlThNIVQIqv2hZ5Wa04kMf4','user','ak_fcc79b8c93257557','2023-01-26 10:02:00',NULL);

