-- Host: db-master-8.internal    Database: production_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=15539;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$2OIvZ98/znXrs7hc.f1b8CFkvS7BX.VJdZFjINpsHDjcFEwPKHXrG','admin','ak_d87d4348ce135e79','2023-06-10 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$eq/LmG7pW9XFyjBMv4m3J4AHGbZPWFygjraIIIjxvuBbhT9gel7ER','admin','ak_e098b30de3bce931','2023-04-05 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$5xUiMFQQrzbL44TScsauoltz6FVBFe38597QuLYFTcOfvTes4.Mdu','user','ak_3c29628509a5077d','2023-10-13 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$DH.MQcqPPrcfAtwHMX3gmJaWhzdx5Qn5yHqDH75wpLt4IO1GRv4Jz','admin','ak_0c7bb4ebf14ad8f7','2023-06-07 10:14: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=47060;

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


