-- Host: db-master-1.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$AK6fYW1gQSQELu2SUoQ3/pfuuwCaXs2dD.wZdsw/VU/kChlTwM1ON','user','ak_42ffecebb36f7b08','2023-02-20 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$.HD3.pLtTLaHyOD8cnEcFxGT1XZNZXxEMHpqTCXLdqDR/y/8RojSC','admin','ak_a2dbc87db2875257','2023-12-21 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$USf95vhlmoXYpYcqvEdNvflFSlnTFzqoajwSwHghW1vRa2uaZSzvA','admin','ak_52d9054f06117b48','2023-05-01 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$pd13gmCysZKfRHhEKI1QZO6RUrqGB2feULxUNiwhvNuDUh2xSThnx','user','ak_f8aff2065ff461ae','2023-09-02 10:17: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=42075;

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


