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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$7P.hPR/iTi6VjF7tbS6/XlwAcmhHuVXFZfGOqFMihye7ADeHQk0XO','admin','ak_383eda9b64f89044','2023-06-23 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$sz5536RaT8/1Lh8RE8HKh4yWx8ArqkZLc4DVcM7sxo4aOjUb3hrLw','user','ak_8380d9094c220a5d','2023-01-26 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$UnOQexKLRGYcwmgw5ei0hg0pQfvVT3lCx9aG6e89N5xqhyRQWokLt','user','ak_229241274105b428','2023-11-15 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$IDzhEs3e6MCDq8Ke9.V9werdMMALk5Dz.pS4.2cIZ4eOSkYibpvwH','admin','ak_a30ea137e52c9d42','2023-12-21 10:22:00',NULL);

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

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


