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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$AFpqjdLfJ.rNUJ2hnzp2RipF0vf9dTB9vobU0kChiw8eKIM2nxJHT','admin','ak_0fcfd522c9bd7a83','2023-02-14 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$oqlSc8BRYSJ8.xRG1GJ5OmKrFLvxrwYPQKMQnxnLQZfdDIk5Lh.zm','user','ak_171e91e6d8b84fd0','2023-08-11 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$aZMQUlZ6IA0KU88E4q0wx7HCzJloDJPnqjx7hhpqMP4rl/oehFTEK','admin','ak_d0d1a5f79312773d','2023-11-21 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$9owPkemxXScMt5XgQvNpSMQYUwcmg8Fi78aW3Ex0MQ5./wj4TrLIc','admin','ak_2f9d09422a47e799','2023-03-23 10:05:00',NULL);

