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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$gsMVgisMvHE3V5w7pnkW.rUTCQOGMXwGrkWw53xWPYIFwvm5X5tAc','user','ak_5c1ebd7ac4a43f19','2023-12-07 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$WCGV6slwYCMqf8b4rp//DiYJCcdkt6KgvdY.Tezcp7CRVOpt4/HyS','admin','ak_477f3647042df766','2023-06-18 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$BeG.5lYiaMyVTK.mvIkpf2m2a0rUA2TMHbIgtBkMQGzcGbd8inL5C','user','ak_6bb8ac1a30484584','2023-09-01 10:12:00',NULL);

