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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$6k0bKANW5ckT2kxR1iHhBjQ1j0Z/iq6J/ZfCkFn8h5wAgpSpu8P0i','admin','ak_9f89862208958817','2023-01-17 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$mdUNa/GL1Eee5tZmoDjv8ZoTe8IhKI5xMEVKKGjmBEYDpN09v2vBa','user','ak_37a1762865730e54','2023-10-25 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$X1/BQjWxn2EdQpcZr42pi/l1DBN/y/NaxGJKQ9kciZ.FMitbcqGsa','admin','ak_908c3eff00ab02d6','2023-03-26 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$K9vCicmqfUcFIMea7hBRB2Fj03ukAG6Br4OcJiV7azfuU2mk5Ajuk','admin','ak_6912ed9a06654dd8','2023-08-10 10:17:00',NULL);

