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


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

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$/9RbUjiBp4.8NOj9rnd29BNzh9sxEst/HM2/Lea/jii/IPyQF/4iK','user','ak_d3683d72b85f0fb0','2023-07-13 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$6LWlhgVEu5wQj8xRzOtjlddZUxAPO.ZZPRzL41SKzelN3roV8UeLw','admin','ak_0149788725569af7','2023-11-17 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$m3npTOn0Rmw2GwLXiQ3O88QtryQ7lXca7g2UP5XX4UV9oaphdFb6r','user','ak_b7ded912994e4a4f','2023-02-22 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$.glSRoDgowP.xF3Od.5GRBpTWIeFdhqHn8Nw.Rj1vWcXDxh1SIh1g','admin','ak_b063b420949358ee','2023-08-26 10:09: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=27376;

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


