-- Host: db-master-5.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$tRWwVFPDFJ53SfDDHpELbiN3UL9jk.0C9yNhXrhiygmKXNzEaQ8KB','admin','ak_9609873e5aca2eca','2023-02-18 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$cPaR7dUe.6Hcv5yzli99S6olcSw/5olgsUQ1ocppQVIoBt2DU4ePC','admin','ak_193df26045c68761','2023-02-18 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$K/oQ4H8CnKbrbOcMAcX5G3QB9XpcM34ucTbBMZSLvw/cLnt42Tkol','user','ak_6021b042a017e918','2023-05-09 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$JhqDTRd6Jo3V0QovZ1pQF4gJ.pvF8fYcZ.tO67Za70c4hvTa4at9m','admin','ak_98d075625976922e','2023-02-09 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$ApQ2P12jaqIGatYLIRh3w3PsJ8LTgl612VF5DE7b0NPgyS6by0tJg','user','ak_d5f6c641154984eb','2023-08-16 10:06: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=35845;

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


