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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$IPFkTpegahOiEW20vZsr2/k3o535PKvWriFB1eVU3GxQyJVs6VGMO','user','ak_d7631cef2cc6c312','2023-08-04 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$CaZObOAWreXdqWq2es7TPgatCxeGzOfBSgTFmlJ1E1YdB5uGD2m/B','user','ak_eefb0c4dda12290f','2023-11-13 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$3T2AGrKQK4SDCG3ddJj6xk730Gs2AG77N0540voj.6EJhvf7P14Tw','user','ak_4abeb25976f6cd3a','2023-03-25 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$nFkEZdnJ0EOw8AKEQXOix0l7QK5wEF5QpKAE0Yo7bGI7yaLsq70nB','admin','ak_508dcd53b297eb2d','2023-03-13 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$MMWnTuP/5nyNw7AcJu19VJaBYoQtmo3/DvTNo4/nq9u/jwqfvNkn0','user','ak_383ec9042da91523','2023-04-16 10:23: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=3840;

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


