-- Host: db-master-6.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=9663;

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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$8lejz/tWUr057cYSHk8c2CjcJaGf3ShxdNMdi7TyJyGO64i/rOSQJ','user','ak_65e9a4ffc2135ede','2023-02-10 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$Hlj0hCvvh/kyo27Jbync4S.rOFy4nW4wydYol2aBXxtPZUmiq61Ci','admin','ak_dc1e43eac892746d','2023-11-16 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$yWONdoddG6phXj4Iw81ydOe6sdvpU0CCBEMJDE9P0AhNPznDgIqma','user','ak_ff56eba17d7b3421','2023-12-24 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$aUW.3yjYcDPT4uQ4J8uxvRQamQQ.cWWV.6/opo5IYtpiF7vkw4QLI','user','ak_d0ae5e6519ff8187','2023-09-13 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$W.VOaUYRzB1Ex4.IAZmkfHPmJ86YomUsKHwPZxrRK7UVRExUgdR5L','admin','ak_b570edde334d9631','2023-12-06 10:08:00',NULL);

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

--
-- Dumping data for table `orders`
--


