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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$l0P9bbchv9RUFAzx7LBjEjH36oKp3lAeaHRvS6E5JIqg/lVUDv7Xg','user','ak_8333d78cc2e81a12','2023-03-27 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$HULouWbhoSRS/rY5dKVGYaS/WE8nZ5SUwyTUtTHj/3NZ4zm5A5DKn','user','ak_aa33605cbf51d3d3','2023-06-17 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$QlCqGJ2q26Gz.mj6n484pfNtD5QrcVKcNuOKopmUcP6OefD.3CTCK','user','ak_02edf85e27de81a5','2023-08-08 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$aYNM3Ap1xDtDcPEV8uTYEoSiJ.0g6OIHAcutadAUZDgoguEFs.ffR','admin','ak_a5c051d528e3e3bb','2023-11-19 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$j9vvWtmI2Wziug9wqqJC15tk4JwQrrXoCKUZr/7sGXyVWE2FxQUCr','admin','ak_a34ae1ced7636e9b','2023-01-13 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@example.org','$2b$12$EFjS7svUWA7cQiziiBJG9GBeVTET2T0ID.MdMsRh0.XqqnWZoAohX','admin','ak_93ee0993450addda','2023-03-04 10:00:00',NULL);
INSERT INTO `users` VALUES (7,'admin@internal.io','$2b$12$G58gIyYMD00cBLW4x9mmXibwW/d9wBMtAiFtasc36iExUn0SGxlCw','user','ak_a9c587c660724b55','2023-06-08 10:03: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=2913;

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


