-- Host: db-master-2.internal    Database: main_app


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

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$4nAJeZiai.xSQpmHyNCNjoTU1wlnPedLbakZkXXdsHiLxq0gQezH4','admin','ak_0e7b9ebe9c32d676','2023-10-25 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$YuxkoZbB8.8oDxtGHC8VqJnOrhNFsqJWKt/8W.0ahXI9olantayH0','user','ak_c2a57e140999dc65','2023-01-27 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$tlxT1tFsf22Cpzrz566gdAL99snz90wXnUKEe6TKFGSUgcxEw2AFB','admin','ak_ba4c6b2f812f27b2','2023-01-04 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$nC4jP2NVKUrq0to4i0PrluRJ5YGhIkt/gpj/zo9nfTugmlUSEBqWc','user','ak_ebf0e8dd49847e9a','2023-09-15 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$fjYeBUTBiZ0v/XnlnCTUUsDFF7C399VmmFcOO7ioB.UdzTZz8/9fS','user','ak_bd3e26ac7e828bc0','2023-12-11 10:16:00',NULL);

