-- Host: db-master-8.internal    Database: webapp_db


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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$c.YZC/Ohif35Qncrx.nY59h4I.1kaemfVzCa3u.2cDzU4Dbczja0V','user','ak_441737387f4ee6fd','2023-01-15 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$cGxVM315wEM9OhLFV59e0eJqkE7ri49LL4oFlHnz7SCbWdxiELTaA','user','ak_55115201607b59d7','2023-05-13 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$gotXOBluArhJmFH/1xKamaYp2Ln8jd718uhV1OuTfFMl3IIEdOQbr','user','ak_5583e3c93e143699','2023-03-16 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$mYlvNX8zGMc4HhK5pWo.iwmjxVLBXN67vwCyLQGUfEhakPP3uYo9I','admin','ak_8481c484c69f9cd0','2023-02-13 10:13:00',NULL);

