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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$n32m8CKvwId6seDl/9kZD/NEifOEv890dXw8N28rlRrIXCGkMpJ5p','user','ak_376cedecb91334bd','2023-04-08 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$1Msb98Q7va9ofntw6CPMZN9hjmHQkfCOB477iJuA3aaTSt90YbBTk','user','ak_a88b5841e6f36f6f','2023-07-19 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$aHFnvNoYEFXsZZj0BWwRNwKxLfq5.nLgmmYWl5GZd1EZ/ZTSgsYGd','user','ak_8db281e001524b7b','2023-06-13 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$roDUsGtHO83iTiTAq9QiJtC2UAOWTpIboylohodt9evlyDImR3tTL','admin','ak_f75833aa72a13394','2023-09-20 10:14: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=39696;

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


