-- Host: db-master-7.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=27278;

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$nnKzzPu9wsACNqAhRWWakCClRmIv0jcCCsTCtRTMD9B.cFukdYxS7','user','ak_94c93448b7f6b059','2023-08-23 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$hhCUBJWpVG784qAvew8xQ7L7a3dA1jrvynSxgcT82Pkyp0GW9KzMJ','user','ak_b965864bd1a56da6','2023-02-03 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$G7ypIfAwPhhd0J/jVLoLGh5ARsy8yvl1uCwNnv8CusZ4Mw7OrH0Rm','admin','ak_701903b25f9a2b27','2023-01-08 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$2yyJsZejCIh/WMRwrl05hp87zTz6Zr80sbNMObPui/Mlu9jQ3QGyV','user','ak_f6a6d6766272dd00','2023-08-23 10:16: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=27779;

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


