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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$mDYL//hEqRoZI1ZeFKa6PzrhhdocOKtUXpJX1dmidl7FiVUR1u3Rv','user','ak_d9700fce0d1e3096','2023-01-02 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$3a2/Y52QWlTZhvSpD4kIuCg8VzQjn9Nv66mnu53drhZRFCjTKCcZY','user','ak_5b4a2cd726169006','2023-12-11 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$o57mJI9zjZP/H6D/eC6q3xgq.7BjIhYxLHZlQEh7hweOUR5X63HSn','user','ak_fe48c1148ecc1568','2023-11-17 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$YqfU0kDq2ktgCvWrfbrPeuQViufxda6WQXm8m3WOaaHRN/WSZuyqu','user','ak_4f02ce8b8fa0038a','2023-03-13 10:10: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=49602;

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


