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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$S8RFPB0oRDH50YmUv9.ATBrwmEpusM8NlToQ5vKzvj5s7Q2b.9CAD','admin','ak_44d98598392e914a','2023-07-26 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$xOEbnsbbDqMlYd7X6q7C2.DWW42wUiqDAfIAlwpZq1cxk74.HPb46','user','ak_868992830b63b10c','2023-09-20 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$Yi773JMzpK0NguB.xRInbu8Es9ELzys2zTidVrPH7shiarD.GwnLu','admin','ak_b5639f41628ddca2','2023-08-16 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$N1aZrk8rPc9vgXe9YUdCsjGsHXn7yasn9B30QbImhzqnh/tPVPDJJ','user','ak_0f7ba32f06efafe1','2023-03-13 10:23: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=4697;

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


