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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$SW43w2HHM7787mD8rPjkS/aDqqCKbvOZiZBzvDT8Hou2Bgue8rWcO','admin','ak_46dac2336cfb77ca','2023-03-06 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$H4ozSlFJmZU2AlHPRH5YWrRU212LtSLYUslG3nOqIVtzftfUEA./z','user','ak_f95ad4ac3bb2c813','2023-08-23 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$4QPJPvcOTg/GqdGDLzBhbPQoylMv2Ajea.jZ3zb0zlgSJJqj1nKVX','user','ak_7aca6f5b85a7fada','2023-08-13 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$UqpBiw2Urys6IjHvAkO4sekru8L0/rMUD4aGvorlMHnlyu.jsC8s2','admin','ak_e79297f689077fba','2023-02-10 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$5J8wnfV23E/u.jgiS06sMfyDwiqN02rzGZesyWEhl/ReLwpWxSS7e','user','ak_3be738bd95a5cce9','2023-05-20 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$eXeY62yc9oKBEz1YGsfvm5Evx69mRLud4KDAQPJ8CaOQ6e5AymSjG','user','ak_741fb99221636f54','2023-08-20 10:14: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=15646;

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


