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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$LbqlP4WA6H7iigkmYkyKtBV9zxZRYYJAAOITwx7NUMvo3W8rrqXZ6','user','ak_30e341484d724fe0','2023-03-05 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$S3Z1dCfQBSK8EnRYaUHMJFRLRTsczzXdSDK3uPuGTR3.n0viYQfCm','admin','ak_c56c66009f2acf64','2023-03-22 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$MqhMYjsrW4ryb6pnjolyiHhpKYafXFhJLqKmXjZKFrMrv2pSWH..T','user','ak_9809037b7b6466d7','2023-06-28 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$Cu7/gxWgXdyADKYUDYKuGg5TMBDz0EP2/L9DKw8egoVwSj1nnKWH9','user','ak_a10a25ec7ff51e97','2023-03-19 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=40588;

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

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


