-- Host: db-master-0.internal    Database: production_db


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$BK6yH1cc32ph2w/XmVwQfqc4EH4qhOgX6VbULZ1Gi.LGFNWxuQmn2','user','ak_cf649681c08d5595','2023-04-24 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$aGWyUptbMkP26ykyocMjJaDguKr8RTyTsmheJmHWZU1nZbA4Rrmgj','admin','ak_74117d5dbd75391c','2023-02-18 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$Bf9PIBqOFV.5cuTgikshsFHVTY/1phTS6J2gUQ8Ixq1ecsvuID07c','user','ak_10026f3863974a04','2023-05-08 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$hkMadKoZZ6tOanAjn0oT7m5Rn46r9jgZ7StsznPoJDNi/37sXQncB','user','ak_49fedf44f04170d1','2023-09-17 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$pUqSV85TyJ4FgGurayEbLyYbvu8bXnPQoK7ukYsqJg0SV/xHPkjyh','user','ak_7d188db5621946fa','2023-01-24 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=22304;

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


