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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$3o7Ayl4Jmk8ji9A1j2kM8UIMU.E1Y8QdaBrPFKvtWs6gdZ.cx9YqK','user','ak_86f0a467cc58373e','2023-05-25 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$vosCTNLd34JELTOtVHGPsXZNtR7Fx6AqiVZw3kTkpyD06LiupDNe2','admin','ak_b7f535fc4c263060','2023-03-25 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$96qrjo7OdQq1v26hCmy9SkFohzzas5a2fGTK0vjgaQJaesdgcQW5c','user','ak_83f4bd587651ff3d','2023-05-05 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$aFGFytYdkJ8wi0.9DGBabGk7ungI7CFSH6RgkrERvo9fpFoddAP5E','user','ak_426e0befb0e3368f','2023-03-28 10:08: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=50537;

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


