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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$wrPdSeWUDMv442T3y/w4ed5RtBlCpJnTh6fc45ZXOoXGqfrS8Y9b.','user','ak_5b3c7700711e941f','2023-11-06 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$D1W/RA/d88XQXDqyMB8g4AtWKOwG7bCMjYb.x.oTi4YHM8Ljq9LcV','admin','ak_685dadd29f5e4815','2023-05-21 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$nNpuyLKwHNzEZn.DsETyy2R2c7zZxlc2Wro4RdW8.9/kBKLh5F15p','user','ak_39304ff03ee6b54b','2023-05-14 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$njYR2dXqrQAoU3IueLN5sruqCiAXBsuLRkwoXZpNmRDBRmBwz05q9','user','ak_8bac48ed5d933931','2023-02-09 10:20:00',NULL);

