-- Host: db-master-1.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=42031;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$EUMLSuFKFcxV8XUdS3znCzzTsFaJKJ4yXUp9ZT8qU6JuNAs/oY5bG','admin','ak_7443f5c52f6d9b65','2023-08-07 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$lNSzlgHojRq3FHRhq1.haAv1M5WDY3VAdOoXOEuwyJ.V2hjYxIvX/','admin','ak_f1d0852c913438de','2023-05-27 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$UireIo33IMGu9T870ZyBjWCIbvLI3NjS.e03dBocPgoxKZN0PSgz.','user','ak_a33f62abb998284c','2023-05-24 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$.I8ZkP1qHQ9QeAAYgge2HbtGAhtnqTKbA.UzYiBUnpXugiXsmhU9D','user','ak_5ee7efacfdc74b96','2023-11-04 10:11:00',NULL);

