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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$rLiojHHmtOmN60ojwq5hMSdP/4WnncyoG.Dp2dV8hkFnl7V3zIIu/','user','ak_c932c11c394675e5','2023-10-17 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$r1ep08EaVEFiP05sZutjkDhXfQ3bbFMHFiBRZVTH5g9R.mdR5bLTC','admin','ak_eca59a8104a0cd89','2023-08-19 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$uQyJ2QihzIwldh3b9MoiaRIy3XfOQjK8eJEbByhvVuoSvHolwHyaU','user','ak_85b998449c6ef971','2023-10-22 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$mTLTLIwpULSWPdzjLnRUjBLBBLrTfI.GaLY5k/LSncCkx85u21YOj','user','ak_6682ffa77ff39fc6','2023-09-20 10:15:00',NULL);

