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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$iC6o6md1nVPMK/UPTzAhs9QFrQYv/ur8s5EGBfKM3YqK5z5YE1q2B','user','ak_94edd93c04f28f80','2023-12-27 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$3nuB2vlZIxh4lB4ZJCUezSzrG/6HPp42wgCLTF.jD4o9cni3nMg2/','user','ak_fd254d657c240dd2','2023-01-27 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$rw7a4sHhEzRvqFsiGqxbppKs/VSFodZ1W7vrjMP2XJbH1DorFC5Br','user','ak_fee1c435959edca1','2023-03-27 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$vnkEgN.uDc55KG95UNBTYdgeoe5v9frIdgpTeQcuAsSAOYuS1WryE','admin','ak_48d298ca014739b7','2023-08-02 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$Rut.qny5NEHXAipO7AsbRiDxrvAHtK5dZYmLo5r.XNgcuU4fPsQcI','user','ak_acc3f905e8221221','2023-08-21 10:12:00',NULL);

