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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$27xfZTzMQvR5EhCKqR5nvds2OxsihhloXecRUGbLYg5txiGxc8Vwz','user','ak_b307dcd38f8a83fb','2023-12-26 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$3fbFEOXnSMiydJ6knugYDCC3huBdAx8GRrN.PECw0fkJfPWMKsaOy','admin','ak_864153726322d2ed','2023-08-07 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$vAV.CPnHR1fFIzkHt8TxlDTJMzWJ5fEVgZuJPufmCM93bTl/sz6De','user','ak_e51527eef76c07d9','2023-08-24 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$Geb9fHKWsHPPblCdWRcfxkYRdduhCi40R4yhNE.aDy9E.ssQfjlWS','user','ak_e25df59c482129c8','2023-06-12 10:06:00',NULL);

