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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$hlo6rXDLZDND40LWJ7Usq89AaVwz5BiBQLbnxG57fZ/Se16KGuC7B','admin','ak_2230f9762dcc3561','2023-08-21 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$n0zr/SJBLZTykp51zkkqF0NWG.G8PzO2bMjpwQG3gyPttQVoUvjoS','admin','ak_f9936c275f646106','2023-03-02 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$Urnl7gUG6euWCz9Ae2WkgeirrkTeVX0yTf4xCkZbMCUM0Rj8niaqg','user','ak_11a4eec7a310ab73','2023-08-22 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$yDjkISKOCaT38idpW5nxVl02Ppek7b.QFWt1e89NDJczvjPkQuqZW','user','ak_e2378300aa3808a9','2023-06-01 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$Hi9.mIeog3O0hgP8HgVj0dTycfW5DMBrpCVbFWE4mr9ipSBHIfSlU','user','ak_c547acb04ed7a091','2023-05-18 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=18971;

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


