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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$RUh4lWdmcUMucwEk3u3ugQ6rtcrGJLWg3czHdtz54xEWgnQ9Ojw2j','admin','ak_93e69165d63b2c96','2023-11-06 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$s3bZwgyEwNE6X80/ggg1jN1jq8edFAEEVFWHAzikr5JdamKW/qrOP','user','ak_47a78d329134f158','2023-07-21 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$5Cjmwa8RCUjJhKw7cnjFJ2sgQv62zSlwmCEbo7IOA.iqK3NVmTwnH','admin','ak_dd4952c329d76577','2023-07-07 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$ueONY/Jr8mw3l6zCGQkrQ1qrfn/Thg5InsZ4Up8xihK.TXtaSFWGO','admin','ak_0520020a5807a411','2023-03-09 10:18: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=39220;

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


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

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


