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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$bByb8TfexKix1g2fJK.cuOlo20Mx52bd41twqqCZz//W/79n4ZnIo','user','ak_cc6bb82fc3eea66a','2023-06-01 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$86VHql9ShR1TFrv.SX58fNHiwNKwovYJMIkpB.atS4o2Tjibzp27P','admin','ak_5e421c1423415158','2023-02-17 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$BqMBPZORj93b/VtbU4jbKydBzy0FHa0UFuYVFvt/8jPNN82/wVfjc','admin','ak_cfda83f5f1215444','2023-07-03 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$HhOlS0yTqUPHpizMBH1C.8WEzIyyj6fgqtdx51TpbNE2EzzRSZK4g','admin','ak_058bd0283f07d1a8','2023-11-14 10:07:00',NULL);

