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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$SktB8QjXqov0pBCfwBlRe7RBzv8m/YGdfjYCfqRBgJ2L0dY.6nGut','user','ak_1129dac6d2a36455','2023-08-06 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$T2rBviyk1tZYUKR9eeXZBCKH/oO0jL88tLx4QpOxaA5WDxEU1II5.','admin','ak_e323f2ebc4ddf99c','2023-05-01 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$Y1wPqefkGDdjREdtan0dzFyFGHOVLQvj8D9KosunhaLIjVset2C9a','admin','ak_fe83ebc8876e00f4','2023-10-12 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$1WeRp.9/lv1PEsNrNtgtJLH47hWwvnkGrxa/A1Hr8Mh4Z/.b568aa','user','ak_baf597bacf8cedb2','2023-11-21 10:17:00',NULL);

