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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$4yEl26FsFvq3eUw4cWcelmL5DJq2ECdGTUfG2o82Wj2c088dmd3my','user','ak_3d76758cf7e9ca1d','2023-02-21 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$WiA3VQyLUQ6E04FEF1sXskwLfM8qVEsQKBarZFElHzRXy36ptU8/g','admin','ak_f38087293918f351','2023-06-21 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$/g21MuApqZhvGIRABQKnYGDOFJwyxSXAXikwofFCR77YfobrkK98K','admin','ak_75a319051a1b2f20','2023-09-19 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$HAxpebJDOo6cdnPytY5aUEwkJHGgrddDjUhFxjAYz2PeN9UIxWIxQ','admin','ak_1b46e8be851de32e','2023-04-07 10:05:00',NULL);

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

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

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


