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


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$a4/0TkD7qrmZXy0Tn6VgXdaaVfdSud1waCcd267jOXTThf/xafXdt','admin','ak_99a599b5e20e28ed','2023-10-24 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$JxqnBLZhlNWqQ8iDFiWWpYyXY5W/LtuuOg0TS3rWaxFHlwfMzdzyP','user','ak_41d9d25c25f58914','2023-06-25 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$eaaIouINridz12soEMIiTyXTabhUrDdasbYvsA3TIRWhESKXMFSFk','user','ak_ce77e54a16a5efb1','2023-02-10 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$f/jIsDIqzIyzp.oMF/vvCk6dG2u0jzwLEt.Uix9.OOwPO7c043o4V','admin','ak_10dad923a4881cab','2023-09-21 10:11:00',NULL);

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

--
-- Dumping data for table `products`
--


