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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$16oUFq3Xyve8fA8cx41a/ZuqhYweu0.dQea4/vHG6vSVu09JUrMt8','admin','ak_72d36e2efdde76cf','2023-04-27 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$Yxo8sHxrFVL2XA0sqPj45vWVP63DZTbcj3gUq7nG.vejAErwVPY8T','admin','ak_10dfb556569f20df','2023-01-24 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$3sFB44Bwvw7H3t/Pe63KoCHv7F.roJKtYHjYtbWkIoHyHR9ifwMtn','admin','ak_a065c676ab662753','2023-04-04 10:16:00',NULL);

