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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$8mopoYWTDt/bkUS5SBAB.elUusYgIIrYDiryLt3pxcmJdM6dJOdpn','admin','ak_8b6f09bcb50bdb2a','2023-11-10 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$zVilt1IfnuUcMsQOo8GchBfOsjMlziJQFk.Xvo8ZyBNYcsGMQH6wu','user','ak_34e033ea92e806d1','2023-11-21 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$yS//G7.oxAhyAXG4PaBFaCbGCXWSZoRZ0qYv8.RbehpmKLlEwoPah','user','ak_7ca98feec50ad3cd','2023-02-06 10:13: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=16405;

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


