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

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=7068;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$h/kz8lBhcVSGsD7.olPkYdPmRmAnuGHYVCiJSPKPbWcLe1KvAtnH/','user','ak_31dd1dfb1a8eb2dd','2023-11-01 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$Kj48sVHTCLY7uOEVHsoxzN4wR9jnHPH3WDI2N14alb215XZUbGIDK','user','ak_2f507c9e3abfaa6b','2023-05-09 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$K0eZsMn3XYuZotU.5Sef1H06k0rn6pjqMPjfxB6Z.l7VQF6W/fkD0','user','ak_6251286268872b64','2023-05-01 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$vr8rnIH1ig3gQmCL/tzdD/nFPpka46GmvGzngY7kljy.xNVrIhM.7','user','ak_cde0fbb0c898cf5e','2023-06-17 10:14:00',NULL);

