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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$DNXm6ixftQ8iwDmseKqOSTiuwBKL8U3y4r4bFXKG0AxEuRz.j2P5W','admin','ak_3db1ce387d1d1f52','2023-05-12 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$YmguMJX1bAyw4vnqgAp94G/QesClaTuuZw8k7RhfOTl0BKXRfXhHu','user','ak_3dfe1d2481eb2f70','2023-01-02 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$6zv3sRzB1rLsugCcZ8FvmTHX7CLXcrPaZDrbfmRnSzFvbqgU6lZk4','user','ak_80cfb6f364e862c0','2023-08-26 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$immQMC8NUk0cx15oBKWezghdfwurcq7iR.DPqo06e/wxsGwRQp19n','user','ak_6c2cdd193a30f224','2023-03-22 10:02:00',NULL);

