-- Host: db-master-4.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=19298;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$FGFe3p2fga/UMdlgtj3xukeeTNFLSahQIDGBmPlUxav1ZuQJsGQaJ','user','ak_d84b9796b919f75d','2023-09-03 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$JDC8toqF416JUWn/U9G.l8oSl/5O9XcL98KIyU37aWt.ufsLMOpvG','user','ak_dd769b4923b1faa6','2023-04-20 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$DrWuPQ7T.21FhAJTd.rXem3aKfUCCL4i0HLpw27DekDsKsUhj0ppO','user','ak_f2ab19134195dd22','2023-05-11 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$c9KcGXflav4WLZQZ8rxLKz7pnpsYC95oT/IvJ6WJgbNtGKAtADRBq','admin','ak_800c52e4ede076fc','2023-04-02 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$F5C.TiESB130lAXZZTlTiQyU6l.YuxkYmBLwAMjtqVKQCSGdKI2Mm','admin','ak_d2c44d46b87b8e3e','2023-08-21 10:01:00',NULL);

