-- Host: db-master-8.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=34764;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$5hVpHBifESFZmJxMs51N7yw5RgQmJHZ1jV4FXdGoG7zXhMSzo4TAb','user','ak_f0d59c3f3c5a8c9a','2023-09-22 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$HjrR7KgNn8ioLNSd6NdPGSaQ7UJVml/OS/9.ESJ3ieURZU2ng7Mvj','admin','ak_a2ef4eafca065491','2023-09-08 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$fJTDYcwkrarVB0LwwAbqehJkukTQD1UXmygI/L65TOe/6ygrwwtsc','user','ak_3060ffc9730da660','2023-01-18 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$WhspDwR8B7Xjwueg/I9DQ/WkPCp2jzY4cqJxEEn9FRr7YKKWTFgSv','user','ak_036e395351935a63','2023-08-09 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$ta9mYDjfO9TjwQT5hmImXiJ93InY67EKoutwCpuanIyXq9ofKKnVd','admin','ak_f588d4b59aa073a9','2023-11-09 10:03:00',NULL);

