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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$biPAeLZO3/kgJ82OOmQef7atIKLXmPZM2r4Tt0SsW0A7Bgs.3HXTn','user','ak_cda3593d712b9d8c','2023-06-10 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$q7PGN8DCtUAWoa5tE7iiM33cZfUrri0WbpB.WrCkvNn.zDDI.DGIX','user','ak_43cc3883164e240f','2023-10-01 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$Oi.0cJBT1uerrd4SUv5Zo6yLNE.vRwb9eUt1WfjS/w6sfipuwvAH9','user','ak_f3545e345f86a860','2023-11-18 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$9Mf4Dbqo6hxL47WZXabFUZojjEkKvrbASx2t7rCHtSs27U78.7.IW','user','ak_6fe34e460dc4d94b','2023-01-04 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$jRI4YwmOC9cw9RcZXe5f4ReWQ22ULI/MqhWbaWe7OWZQlFob./C2Y','admin','ak_703ad834a19b6fba','2023-01-07 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'root@example.org','$2b$12$n3eaAF.1M0A1viJARsIro2EMijrcQTDBhXWp56zNzueH95V1EMiFn','admin','ak_df08482a32f20821','2023-03-05 10:10: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=6046;

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

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


