-- Host: db-master-7.internal    Database: webapp_db


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=47603;

--
-- Dumping data for table `payments`
--


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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$R6mMYrKWNBVLqr2sonKkgpwBkOO1..VHGSwnpafeAENThHRgyL404','user','ak_f94d6eaeac13f9bf','2023-08-15 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$UlLFcznzGY9K/IZ8VQR72Un1RrmBbxLt/C1tDFp8XjGVe8Rtyw8ox','admin','ak_619111e3f27f61f6','2023-06-08 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$1Ppj5cf6sNpbnRnpDneUk4CPHCpotscqWb176crM/HgWB5a9/w/a6','admin','ak_f35c00d3ed68fc26','2023-02-26 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$Hl6Ad5ZHRLeZblMJBQfe4xody/.AU6a/c9M5vtcP34mcN5Lf0/P1x','user','ak_bbb4b6aa9c23c25b','2023-11-25 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$OBI2C7rEaNaNiu9yOlvuK0Gd6iBk644G4Yy5Vg7AGrqo5srdKLJNt','admin','ak_d3077053ebcfedb6','2023-01-15 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'admin@company.com','$2b$12$W2pn/4B0lM4L4qYnwlwtc0Z05OA1ZVjl02XUEJ2DLiYF.Adw0ekBU','admin','ak_196f3fa7a8f563ae','2023-03-23 10:02:00',NULL);

