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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$cG8.8FTCpORN18HXyeh4OWYJZRPTTjcbqC0OyR3Vgp4ximgA44Vkz','user','ak_4c3e63ea5909b62e','2023-01-11 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$a16acEPcwFFt7EsleswwwgwTHbZ1ndOSpiRLplKc8ye7eXrcOn5F/','user','ak_f1bcb7523988630d','2023-07-13 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$bVMM0zofecywCLyW8q2HnHu.baXTOn.AyWEiZ3qRQcrXBH240Z7sT','admin','ak_fccbf846a0c30ffd','2023-08-11 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$OUYMm61zNG2r3NZV2NhVmpQXl8vo0.o29zn0h3Z3XakGn0ibi92Yy','user','ak_446bb75a0a19dd19','2023-07-12 10:08:00',NULL);

