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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$gJOSO2EgxXtEGXwMVacuy/WsuF7NJUZdWyERpXfDKuKfmjmb3bTlO','user','ak_781373d9f00c4691','2023-07-01 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$LLQkaBtleSVW77qMmEQT17qjSFW97oDaD8pKmKYg319i0GGMIOQE5','user','ak_224bfc29387b3426','2023-02-24 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$uYO3vCxh3iDsu2bW9ySbr4bFgwSnaPV380R6MlZauN0/4C28fdFuD','user','ak_f445f9283fb647aa','2023-09-27 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$zqDgMUFDfHdwUsY2VaBXm48gX46LcfDy5iKpYQPHLZB4KS9oSmP7z','user','ak_fc31c7d3beec008a','2023-05-23 10:06: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=7147;

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


