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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$OsUyFXpVwGiKgpKsnCfu2REVaj9fRHlTjUWOdmUVBLsG4zhFHuPQD','admin','ak_89e52d993b8d95a6','2023-06-17 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$UhxtGzQD/yP7fa8sDb91jcTrfUM9IRndUGWy3mhmiY3Ow3C2zRimX','user','ak_8d17a8175b599bb2','2023-08-02 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$zNkwm2MzaTrXTqz.Ojd61JK9fHRX/xOE98lgacAlBIR0Rl3aHbGrR','user','ak_062cb1ab15a35506','2023-07-14 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$STY.h2LqDoaPlv8d7P60kOJGV78yZGyQ9.mK967GaU2rwGcWdIPKN','user','ak_e398b6de8b7fd80f','2023-07-13 10:13:00',NULL);

