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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$f.86gJqAzEjsrpC0If/REAzXqvB5fLh2EfDN0Q68U.N5UmDTL.b71','user','ak_94798e5823644ef8','2023-03-28 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$fJeFN7xLidJOKQhr2JF8r3vVq/5NiUmgTtnYtMJYbk6onX2rXmBsz','user','ak_f5702cbfcdf810f0','2023-08-05 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$pD8KoE9CUNvXgPpzVYTqYa7BYt5Ten/ByMFkSpSN4S1vFV2g3E3E8','admin','ak_025c2c67ab583bbd','2023-09-06 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$HpTYZJY0NJr3/6wWaJ71To058nio8ujrbgfY4l3S7WXCDCgW7y3AG','admin','ak_6040ca6a234da62e','2023-08-05 10:04:00',NULL);

