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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$UB1bZWNopVAaeIBYelFtk.53qlRbyYrSVXQ5HSiJmCHD.yf.jb9VZ','user','ak_ef9c75a7b2f44842','2023-05-25 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$YGpG9ivYYZqfN.9cieEk6sVWAO2/6Lz/hBOh3dHkvCoFaGw2afeEE','user','ak_52ea1a8631f68fbb','2023-06-16 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$7P8rWIbIAt.W86oTTt5wg02k8zlNVYdVprEtdOmbTGHMVxe6YJG9V','admin','ak_9cc6f0362e836ee4','2023-01-09 10:02:00',NULL);

